I'm working on an app that reads and writes exercise minutes to HealthKit. Everything functions correctly up to iOS 18.0.1, but starting from iOS 18.1, my implementation is no longer working as expected.
Here's the code snippet I use to write to HealthKit:
let workout = HKWorkout(activityType: .other, start: startDate, end: endDate) try await healthStore.save(workout)
This code successfully writes to both workouts and exercise minutes in iOS 18.0.1 and earlier. However, from iOS 18.1, it only writes to workouts and not to the exercise minutes data source.
Has anyone encountered this issue or have insights on how to resolve this?