簡體   English   中英

錯誤Domain = com.apple.healthkit代碼= 5

[英]Error Domain=com.apple.healthkit Code=5

HKSampleType *stepType = [HKQuantityType quantityTypeForIdentifier:HKQuantityTypeIdentifierStepCount];

當我想要這些步驟時,它會起作用; 我想要DistanceWalkingRunningExerciseTime ,xcode向我顯示下一條消息。

Error Domain=com.apple.healthkit Code=5 “Authorization not determined 
UserInfo={NSLocalizedDescription=Authorization not determined}”

HKSampleType *walkingType = [HKQuantityType quantityTypeForIdentifier: 
HKQuantityTypeIdentifierAppleExerciseTime];

請有人幫我。 謝謝。

HKObjectType *stepType = [HKObjectType quantityTypeForIdentifier:HKQuantityTypeIdentifierDistanceWalkingRunning];
NSSet *healthSet = [NSSet setWithObjects:stepType,nil];

太尷尬了! 只要獲得步驟的授權,就無需距離。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM