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?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With