Reputation: 245
Is it possible to add metadata on existing HKWorkout (subclass of HKObject with the metadata property) ?
If not any idea on how to add data from my app to existing workout record in healthkitstore.
Upvotes: 1
Views: 413
Reputation: 7363
Records in HealthKit are immutable. To add metadata to an existing record, you would need to delete the existing record and save a new one with modified metadata. Note your app can only delete a record that it previously saved. If your goal is to be able to modify any workout saved in HealthKit, I’m afraid that’s not possible.
Upvotes: 2