[英]HKHealthStore deleteObjects reporting Error Domain=com.apple.healthkit Code=100 “Transaction failure.”
I am trying to delete somewhere around 400 objects in a single go with HKHealthStore deleteObjects and I'm getting this peculiar error. 我试图用HKHealthStore deleteObjects一次删除大约400个对象的某个地方,我得到了这个特殊的错误。
Error Domain=com.apple.healthkit Code=100 "Transaction failure." 错误域= com.apple.healthkit代码= 100“事务失败。”
Here is the code: 这是代码:
self.healthKitStore.deleteObjects(deleteQ, withCompletion: { (success, error) -> Void in
})
Any ideas? 有任何想法吗? Thanks! 谢谢!
有时,如果您在保存或删除样本之前不是requestAuthorizationToShareTypes
,HealthKit会为您提供此错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.