In my widget, I place a header view.
var header: some View {
ZStack {
Link(destination: url) {
Rectangle().fill(Color("WidgetBackground")).frame(height: 36)
Text("Header")
}
}
}
This is a simple text on a colored background.
The url is the urlscheme for my app.
When I tap on the label or on header view, it opens my app on medium and large size widgets.
But on the small size widgets, it didnt open the app, but it flickers and reload the widget.
I also see the flicker happen in medium and large size widgets when I tap on empty spaces other than elements.
I have no clue , why this flicker happens.
Based on documentation, interacting on widget should open the app, without any extra effort.
Am I missing something ?
question from:
https://stackoverflow.com/questions/65601013/swiftui-small-widget-is-not-opening-the-ios-app-on-tap 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…