HKHealthStore deleteObjects report Error Domain = com.apple.healthkit Code = 100 "Transaction failed."

I am trying to delete somewhere around 400 objects in a single pass with HKHealthStore deleteObjects m to get this strange error.

Domain Error = com.apple.healthkit Code = 100 "Transaction Failure".

Here is the code:

self.healthKitStore.deleteObjects(deleteQ, withCompletion: { (success, error) -> Void in
})

Any ideas? Thank!

+4
source share
1 answer

Sometimes, if you are not requestAuthorizationToShareTypesbefore saving or deleting samples, HealthKit gives you this error.

-1
source

Source: https://habr.com/ru/post/1628465/


All Articles