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: