Hello everyone,
We are encountering a critical regression introduced in iOS 26.4 that results in permanent workout data loss for users.
When invoking HKWorkoutBuilder.finishWorkout(completion:) while the iOS device is locked, the save operation fails completely. However, it fails silently: the completion handler executes but returns both a nil workout and a nil error.
Expected Behavior: Before iOS 26.4 finishWorkout resulted in a workout id, and correctly stored the workout data in HealthKit.
According to HealthKit data protection documentation, saving data when the device is locked should either succeed (writing to a temporary journal file to be merged upon unlock) or explicitly throw an error such as HKError.Code.errorDatabaseInaccessible.
Actual Behavior: Because the framework returns nil for both the object and the error, the application has no way to detect that the save failed. We cannot implement a retry mechanism or queue the save, resulting in silent data loss.
Steps to Reproduce: We have built a Minimal Reproducible Example (MRE) that reliably triggers this:
Initialize an HKWorkoutBuilder and call beginCollection(withStart:) followed by endCollection(withEnd:).
Wrap the finishWorkout call in a short 5-second asynchronous delay, protected by a UIBackgroundTask to prevent app suspension.
Lock the physical device during this 5-second window.
The finishWorkout completion handler will execute while the device is locked, returning workout == nil and error == nil.
Existing Reports: We have filed this via Feedback Assistant (a month ago) and opened a TSI (a week ago), providing the MRE project and a sysdiagnose captured at the time of failure:
Feedback ID: FB22396180
TSI Case-ID: 19755043
As we have not yet received a response or a suggested workaround through these official channels, we are reaching out to the community. Has anyone else encountered this silent failure with HKWorkoutBuilder recently?
Any insights or escalation help would be greatly appreciated.