Post

Replies

Boosts

Views

Activity

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
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 App preview is blurry for the few seconds
The issue still occurs I even checked other apps and the same happens. My connection speed is very high. I think there is some problem with an algorithm processing video after upload. When I watch it in AppStore connect first the video is small then after a few seconds, it resizes to a bigger one. Looks like the beginning is in a lower resolution than the rest. You can see the problem in my app: https://apps.apple.com/us/app/snippety-snippets-manager/id1530751461
May ’22
Reply to UpdateApplicationContext Not Receiving updates
I don't know what was the problem but I figured out how to solve it. Basically, you need to recreate the target. In my case, I was using "the old approach" with watchOS app and extension app. Now Xcode 14 offers only a single target - maybe that was the problem. Steps that I used: Copy all files from your watchOS app to another location. Delete folder, target, and schemes, remove all remainings from watchOS app. Add watchOS app target using new Xcode. Add copied files from step. 1 Configure build settings, signing, and assets (whatever you need). Very important: set bundle identifier prefixed by your iOS bundle identifier. Very important: set WKCompanionAppBundleIdentifier in info.plist that equals your iOS app bundle identifier. Super important: go to your main iOS app target, general tab, frameworks, libraries... and click "+" and add your watchOS app. Now I like to use first watchOS scheme to install watchOS app first, then change scheme and install iOS app. Now your apps should be able to communicate using applicationContext.
Sep ’22