Post

Replies

Boosts

Views

Activity

Refresh SmartStack Widget in watchOS 11
Hi, I have an app that provides a SmartStack Widget. The content in that widget is dependent on a state inside the application so from time to time the app needs to update the widget state. I tried: WidgetCenter.shared.invalidateConfigurationRecommendations() WidgetCenter.shared.reloadAllTimelines() However this does not have any effect. I only see updates on reboots (device with watchOS 11 B5) Is there any other way or am I doing something wrong?
2
0
447
Aug ’24
watchOS 10 TextField background behaviour in List
Hi, I am struggling with a design change in watchOS 10. I have a TextField next to an Image in an HStack inside a List The following code produces another (correct looking view) when using watchOS9. With watchOS10 a strange background is added that I can not remove. struct ContentView: View { @State private var searchFieldInput: String = "" var body: some View { List { HStack{ Image(systemName: "magnifyingglass").foregroundColor(.accentColor) TextField("Search", text: $searchFieldInput) } } } } This picture shows the difference: (watchOS 9 on the left; watchOS 10 on the right Does anybody know how to remove this background or if this intentionally? I already filed a Feedback (FB12293618) but haven't heard back yet
2
2
797
Aug ’23
Open Safari from Widget
Hi I have an app that acts similar to the Apple News Widget (Outside the US,UK and Canada it just shows some headlines from across the web). The News widget opens Safari if I press a headline and leads me to the article. How can I achieve the same? Providing a web URL with widgetUrl stills opens the main app
1
0
1.8k
Jul ’20
Display UIViewRepresentable in WidgetKit
Hi, I'm trying to Display a MapView like the sytem Maps app does in a Widget. I thought the best way would be to encapsulate the Mapview in a UIViewRepresentable like this: struct MapView: UIViewRepresentable {   func makeUIView(context: UIViewRepresentableContext<MapView>) -> MKMapView {     let mapView = MKMapView()     return mapView   }   func updateUIView(_ view: MKMapView, context: UIViewRepresentableContext<MapView>) {   } } And show it like this in my Widget: struct MapWidgetEntryView : View {   var entry: Provider.Entry   var body: some View {     VStack {       MapView()     }   } } Unfortunately this leads to this error: RemoteHumanReadableError: The operation couldn’t be completed. (BSServiceConnectionErrorDomain error 3.) BSServiceConnectionErrorDomain (3): ==BSErrorCodeDescription: OperationFailed I also tested this with other UIKit classes and it leads to the same error
2
0
2.2k
Jun ’20