Post

Replies

Boosts

Views

Activity

Reply to How to restore HKWorkoutSession after App relaunch?
Update: I noticed that handleActiveWorkoutRecovery won't be called after relaunch, but I was able to successfully restore the session by calling recoverActiveWorkoutSession in applicationDidFinishLaunching. func applicationDidFinishLaunching() { HKHealthStore().recoverActiveWorkoutSession(completion: { session, _ in guard let session = session else { return } WorkoutManager.instance.recover(session: session) }) }
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’21
Reply to Simulator beta 15 is too slow
Hi, I filed a feedback (FB13195525) and the resolution is "Potential fix identified - For a future OS update". Guess we have to wait a bit, but Apple is definitely on it. Update: I updated to macOS Sonoma RC2 and Simulator performance seems to be normal again.
Replies
Boosts
Views
Activity
Sep ’23
Reply to How to properly ask for location permissions in WatchOS 8
I solved this problem by providing the NSLocationWhenInUseUsageDescription key in the Info.plist of the iOS app (Additionally to the WatchKit extension). The iOS App never tracks location and therefore it never asks for permission, but it seems like the keys are still necessary.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to How to restore HKWorkoutSession after App relaunch?
Update: I noticed that handleActiveWorkoutRecovery won't be called after relaunch, but I was able to successfully restore the session by calling recoverActiveWorkoutSession in applicationDidFinishLaunching. func applicationDidFinishLaunching() { HKHealthStore().recoverActiveWorkoutSession(completion: { session, _ in guard let session = session else { return } WorkoutManager.instance.recover(session: session) }) }
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Oct ’21