Post

Replies

Boosts

Views

Activity

Reply to [Xcode 12.1] Circle().trim not drawing after Xcode update
@Claude31 this is some serious issue with Xcode 12.1, I tried with frame and it still doesn't work. I can just switch to xcode 12.0.1 and it works perfectly fine, but on Xcode 12.1 it doesn't. I recorded small demo, but it's not possible to post a url here -.- Just create a new SwiftUI project, add widget extension target and put this code. It does not render. However, it does work in the host app project.
Nov ’20
Reply to What is the purpose of getSnapshot method from WidgetKit?
@darkpaw thank you very much for the detailed answer! Just to summarise: getSnapshot is called only during transition from gallery to home screen and from configuration intent to home screen. Probably could be during some other events, but it most likely shouldn't affect the widget's logic. getSnapshot should return data as quickly as possible, so probably remote requests are not recommended here. However, if I already have data from previous getTimeline call, I could use it. when using cached data in getSnapshot, it should be validated if configuration is the same as it was at the moment of creating cache entry (It could be changed - transition from configuration to home screen). when context.isPreview = true - show sample data for widgets gallery Could you confirm that points above are correct? I'm still curious what's the purpose of this method. Why they couldn't just use getPlaceholder and getTimeline?
Oct ’20