I am developing an application that gives users the ability to track what they ate. One of the features offered by the application is the choice of food as Eaten. When a user does this, I share this information with HealthKit.
The user can then remove the check mark from this item and return it to its previous state: Uneaten. I wonder if I can request a previously saved battery and choose to remove it from HealthKit, since it no longer refers to the user?
UPDATE
Well, after reading almost all of the documentation HealthKit, I discovered that the object HKHealthStorehas a method: deleteObject:withCompletion:. However, I cannot successfully delete HKCorrelationwhich stores the battery that I previously saved in HealthKit, although the call ended successfully (I still see the data in the Health application) ...
source
share