Post

Replies

Boosts

Views

Activity

Reply to HKWorkoutBuilder.finishWorkout() fails silently (nil workout, nil error) when device is locked (iOS 26.4+)
Hi, Thanks for sharing this. We're seeing what appears to be a very similar issue in our production app, but with one important difference. In our case, the device is unlocked and the app is in the foreground (UIApplication.shared.applicationState == .active). The workflow is: beginCollection() → success add(samples) → success endCollection() → success finishWorkout() → workout == nil, error == nil The samples (distance, active energy, steps, etc.) are successfully written to Apple Health, but no HKWorkout is created, so the workout doesn't appear in Fitness or contribute to Activity Rings. We've received reports from multiple users on iOS 26.4, 26.5, 26.6, and iOS 27, although the issue only affects a small percentage of users. I'm wondering if you've made any progress since your original post. Did Apple provide any update through your Feedback or DTS case? Have you found any workaround or mitigation? Are you still using HKWorkoutBuilder, or did you switch to a different approach? Any update would be greatly appreciated. Thanks!
2w
Reply to HKWorkoutBuilder.finishWorkout() fails silently (nil workout, nil error) when device is locked (iOS 26.4+)
Hi, Thanks for sharing this. We're seeing what appears to be a very similar issue in our production app, but with one important difference. In our case, the device is unlocked and the app is in the foreground (UIApplication.shared.applicationState == .active). The workflow is: beginCollection() → success add(samples) → success endCollection() → success finishWorkout() → workout == nil, error == nil The samples (distance, active energy, steps, etc.) are successfully written to Apple Health, but no HKWorkout is created, so the workout doesn't appear in Fitness or contribute to Activity Rings. We've received reports from multiple users on iOS 26.4, 26.5, 26.6, and iOS 27, although the issue only affects a small percentage of users. I'm wondering if you've made any progress since your original post. Did Apple provide any update through your Feedback or DTS case? Have you found any workaround or mitigation? Are you still using HKWorkoutBuilder, or did you switch to a different approach? Any update would be greatly appreciated. Thanks!
Replies
Boosts
Views
Activity
2w