HKSampleType *stepType = [HKQuantityType quantityTypeForIdentifier:HKQuantityTypeIdentifierStepCount];
when i want the steps ,it works; and i want the DistanceWalkingRunning
or ExerciseTime
, xcode show me the next message。
Error Domain=com.apple.healthkit Code=5 “Authorization not determined
UserInfo={NSLocalizedDescription=Authorization not determined}”
HKSampleType *walkingType = [HKQuantityType quantityTypeForIdentifier:
HKQuantityTypeIdentifierAppleExerciseTime];
somebody help me please. Thanks.
HKObjectType *stepType = [HKObjectType quantityTypeForIdentifier:HKQuantityTypeIdentifierDistanceWalkingRunning];
NSSet *healthSet = [NSSet setWithObjects:stepType,nil];
It's too embarrassing! Just get the step's authorization, without the distance's.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.