Why does the HealthKit permission sheet introductory text say
[App Name] would like to access and update your health data in the categories below
even though my app is only requesting read permission?
Is there a way to change the introductory text to say the app only asks access to the data but doesn't update/write any data?
My method to request authorization:
func authorizeHealthKit(completion: @escaping () -> Void ){
let readTypes = Set([
HKObjectType.quantityType(forIdentifier: .stepCount)!,
HKObjectType.quantityType(forIdentifier: .distanceWalkingRunning)!,
HKObjectType.quantityType(forIdentifier: .appleExerciseTime)!,
HKObjectType.quantityType(forIdentifier: .activeEnergyBurned)!,
HKObjectType.quantityType(forIdentifier: .basalEnergyBurned)!,
HKObjectType.quantityType(forIdentifier: .flightsClimbed)!,
HKObjectType.quantityType(forIdentifier: .appleStandTime)!,
HKObjectType.quantityType(forIdentifier: .distanceWheelchair)!,
HKObjectType.quantityType(forIdentifier: .pushCount)!,
HKObjectType.categoryType(forIdentifier: .appleStandHour)!,
HKObjectType.activitySummaryType(),
HKObjectType.workoutType()
])
healthStore.requestAuthorization(toShare: nil, read: readTypes) { (success, error) in
if let error = error {
print("Request authorization error: (error)")
return
}
completion()
}
}
My info.plist only contains the NSHealthShareUsageDescription
key.