#swift #healthkit
#swift #healthkit
Вопрос:
Почему во вводном тексте листа разрешений HealthKit говорится
[Название приложения] хотел бы получить доступ к вашим данным о состоянии здоровья и обновить их в категориях ниже
несмотря на то, что мое приложение запрашивает только разрешение на чтение?
Есть ли способ изменить вводный текст, чтобы сказать, что приложение запрашивает доступ только к данным, но не обновляет / не записывает какие-либо данные?
Мой метод запроса авторизации:
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 содержит только NSHealthShareUsageDescription
ключ.