Post

Replies

Boosts

Views

Activity

Reply to How to save a workout with a route on a locked iPhone ?
Did you resolve your issue? I had the same problem and can provide some guidance. Before saving the route I first check UIApplication.shared.isProtectedDataAvailable to see if HealthKit is locked. If it locked, then I basically postpone adding the route to the workout until the user unlocks the phone. I give the user a voice alert to open the app so the route can be saved. This is a big hack and I wish Apple would provide a better solution to saving workouts and routes when the phone is locked.
Oct ’22
Reply to SF Symbols missing in iOS 13 version of app
Answering my one question in case it helps someone. All the SF Symbols were referenced in Storyboards and were using a rendering mode as Automatic. Changing to Template seems to fix the issue. I'm not sure why this broke in iOS 13 when I moved to Xcode 12. BTW, the original message had a type x.mark.circle -> xmark.circle.
Dec ’20
Reply to Apple Watch HKWorkoutSession does not collect the health data sometimes
I believe the metrics that are enabled automatically depend on the activity type and location. At least that is the case for distance. I'm not sure what the HR issue is, assuming this is a watch workout. But maybe it's an apple health permission issue. Also, check if Power Saving mode is on. That limits heart rate monitoring. Open the watch app on your phone, tap on General and see if Workout Power Saving Mode is turned on. If so, turn it off.
Jul ’20