Post

Replies

Boosts

Views

Activity

Reply to WidgetKit complications won't update
Off-topic, but I'm facing an issue with sharing UserDefaults data between iOS and watchOS (including the complication). You cannot use shared UserDefaults cross-device, it only works cross-extension on the same device, e.g. for sharing data between main app and Widgets extension. To share data between iPhone and Watch you must use WatchConnectivity. Check out my WKComplications example on GitHub for working example.
Jul ’24
Reply to Journaling Suggestions not avail in Xcode 15.1 beta (15C5042i)?
The SwiftUI view is named JournalingSuggestionsPicker, not SuggestionsPicker, as stated in documentation. The following code compiles in Xcode 15.1 Beta 2 for the device running iOS 17.2 Public Beta: import JournalingSuggestions import SwiftUI @available(iOS 17.2, *) struct TestView: View { var body: some View { JournalingSuggestionsPicker { Text("See recent events") } onCompletion: { suggestion in print("\(suggestion)") } } }
Nov ’23
Reply to Wrong fonts loaded from Storyboards in Xcode 15
This issue is mentioned in Xcode 15 Release Notes: Note: Interface Builder documents using custom App fonts may load incorrect font at runtime. To workaround this, set font manually in code. P.S. I have opened a Feedback Request for this issue after the Xcode 15 Beta 2, but it isn't fixed in release version. Therefore, I wouldn't hold my breath for it to be fixed any time soon. Probably, Interface Builder is now considered a legacy technology, so it doesn't get as much attention anymore... 🤷‍♂️
Sep ’23
Reply to WidgetKit complications won't update
My recent research yielded some results. We've been updating our Watch app, which is WatchKit based, to support watchOS 10 features. We've added new SwiftUI scenes to it, and the app itself works like a charm - no issues whatsoever. However, it appears that WatchKit apps have issues with WidgetKit complications - they won't update (or will have a significant delay) even when the app is in the foreground (such updates do not count towards the daily update quota). However, this issue is not observed if the Watch app is pure SwiftUI - widgets will update immediately, including Smart Stack widget. Therefore, we are rewriting our Watch app to SwiftUI and getting rid of ClockKit completely (doing this forced us to increase the minimum watchOS version to 9.0 🤷‍♂️). Hope that will be helpful to someone. 🤓 P.S. All said above doesn't solve the issue with data communication not happening between iPhone and Watch if the Watch app is in the background.
Sep ’23
Reply to WatchOS 9 complications with WidgetKit - daily limit.
Just migrated ClockKit complications to WidgetKit complications, and have a similar issue. Though in my case widgets won't update at all if the watch app is not in the foreground. Sometimes widgets update after opening and closing the watch app, but usually, I need to switch to a different watch face to force them to update 😕 Any ideas? I use WidgetCenter.shared.reloadAllTimelines() method on the watch app to trigger the reload. P.S. See full question here: https://developer.apple.com/forums/thread/735352
Aug ’23