You should use the new modifier introduced in iOS 18: .widgetAccentedRenderingMode(.fullColor). It allows to override view rendering mode.
Post
Replies
Boosts
Views
Activity
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.
Unfortunately, no. I've checked my WKComplications sample app on watchOS 11 - still doesn't work.
P.S. on watchOS 11 it does work on simulator, however, still doesn't work on real device (doesn't work at all on watchOS 10).
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)")
}
}
}
The issue seems to be fixed in Xcode 15.1 Beta 1! Fonts in my test project are loaded correctly now. 🥳 Too bad, we are already setting all fonts from the code 😅
Here is how it looks in Xcode 15.0
Sample project I've created for Apple to reproduce the issue: https://github.com/SergejLogis/FB12903371
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... 🤷♂️
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.
We ended up assigning all the fonts from the code...
Yes, we ended up doing the same... 😵💫
Apple responded that this appears to be a bug on their side, but no ETA for a fix was given. We are keeping our fingers crossed 🤞🤞
I've opened a Feedback Request for this issue: FB12926788. It is currently being investigated by Apple. I will post any updates here.
P.S. I've created a sample project to illustrate the issue with WidgetKit complications.
We are having exactly the same issue after migration from ClockKit to WidgetKit complications.
I've opened a Feedback Request for this issue: FB12926788. It is currently being investigated by Apple.
I will post any updates in my own question thread.
P.S. I've created a sample project to illustrate the issue with WidgetKit complications.
Hey there!
Have had a similar issue after migrating ClockKit complications to WidgetKit. 🤓 You must enable App Group not only to Watch Widget Extension, but for the Watch app target as well. This should solve your issue (solved for me).
P.S. I still have issues with WidgetKit complications not updating, even though Watch Widget Extension has access to the data: https://developer.apple.com/forums/thread/735352
The same happened to me. Migrated ClockKit complications to WidgetKit, and now they won't update. 😕
P.S. Full story here: https://developer.apple.com/forums/thread/735352