I have an app inlcuding an Apple Watch app and a WidgetKit (iOS 16) extension.
The iOS app sends data via WatchConnectivity
to the Apple Watch app and displays it there. Also it provides data to a WidgetKit (iOS 16 - Lockscreen) extension using GroupUserDefaults
. All of this works without any issues ✅.
My issue:
I'm now trying to supply data to a WidgetKit complication extension
(WatchOS 9). I expected to be able to either access the previously written UserDefaults
of the Apple Watch app or the shared GroupUserDefaults
. But I can't access any of it's data. I also checked the documentation, but I can't find any methods explicitely designed to share data to the complications.
ClockKit
methods will not be available for WidgetKit
complications (https://developer.apple.com/documentation/widgetkit/converting-a-clockkit-app).
Did anybody manage to share data to a WidgetKit complication without requesting a Server API like in the Apple example? (https://developer.apple.com/documentation/widgetkit/adding_widgets_to_the_lock_screen_and_watch_faces)