The description for "What's new in SwiftUI" does specifically state that it will go into the new APIs to create an app entirely in SwiftUI like @main so that one should cover what you want.
Post
Replies
Boosts
Views
Activity
Yes it does, thank you. While I would like the ability to have multiple app clips so I can optimize each one for a specific case, I can see how this would be easier to manage.
I had this problem on the simulator and on device as well using the current normal version of iOS 14 and Xcode 12.
I was able to fix it on the simulator by doing an erase all content and settings and reinstalling. It seems like maybe because there were existing timeline entries that were tied to a different Intent as I was working on this, the widget refused to keep going. Deleting and reinstalling cleared those out and all is well now.
That's just my theory though, either way it worked for me.
This seems to happen to me when I added or change the configuration intent while the app is still installed on the simulator. Deleting then reinstalling the app on the simulator with the new configuration intent code has been able to fix it for me.
You can't, and you shouldn't - because the user could change their appearance from light to dark in the middle of a timeline event and your widget wouldn't update then.
I think the best solution here would be to snapshot both cases, one for light and one for dark, and the select and display the correct one in your SwiftUI view depending on the state then. You can get that by adding:
@Environment(\.colorScheme) private var colorScheme: ColorScheme
In your SwiftUI file and switching on the colorScheme value.
This is a weird bug in Xcode 12 on the simulator. The good news is all looks normal on device, so you may need to do your testing there.
In my case, if I load the app in the simulator on my MacBook Pro 15" internal retina display the gradients are rendered fine, but if I use my external display they look like what you're showing. I've heard that's not the case for everyone though, but it's definitely an Xcode bug either way.