Reputation: 6710
Can I read out an HKworkout
and add my own metadata to it, then resave it? If so how? Or can I only pass in metadata when I'm saving the workout?
Upvotes: 4
Views: 356
Reputation: 7363
All HKObjects are immutable (the cannot be edited once saved). The recommend approach to editing an HKObject is to save a new copy with the changes you want to make and to delete the previous copy. You can only do this if your app created the original object, though.
Upvotes: 5