jjzjj

authorizationStatusForType

全部标签

ios - HealthKit 授权状态始终为 1

我在我的应用程序中使用HealthKit。我正在获得用户访问HealthKit数据的许可。授权后,如果我检查特定HealthKit对象类型的授权状态,它总是返回访问被拒绝。(1是枚举整数值)。这是我的代码//Stepsif([self.healthStoreauthorizationStatusForType:[HKObjectTypequantityTypeForIdentifier:HKQuantityTypeIdentifierStepCount]]==HKAuthorizationStatusSharingAuthorized){[selfaccessStepsFrom:fro

ios - HealthKit 授权状态始终为 1

我在我的应用程序中使用HealthKit。我正在获得用户访问HealthKit数据的许可。授权后,如果我检查特定HealthKit对象类型的授权状态,它总是返回访问被拒绝。(1是枚举整数值)。这是我的代码//Stepsif([self.healthStoreauthorizationStatusForType:[HKObjectTypequantityTypeForIdentifier:HKQuantityTypeIdentifierStepCount]]==HKAuthorizationStatusSharingAuthorized){[selfaccessStepsFrom:fro