Post

Replies

Boosts

Views

Activity

Reply to healthStore.requestauthorization() crashes when called
I'm also experiencong the same issue - until Xcode 11.3, crash was happening without error message. With Xcode 11.4, the error displayed is:Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'NSHealthUpdateUsageDescription must be set in the app's Info.plist in order to request write authorization for the following types: HKQuantityTypeIdentifierDietaryWater'The string `NSHealthUpdateUsageDescription` is correctly set, along with `NSHealthShareUsageDescription`.Stack trace:*** First throw call stack:( 0 CoreFoundation 0x04d86f52 __exceptionPreprocess + 370 1 libobjc.A.dylib 0x000d5dfd objc_exception_throw + 49 2 CoreFoundation 0x04d86d5f +[NSException raise:format:] + 95 3 HealthKit 0x004e217e -[HKHealthStore _validateHealthDataPurposeStringsForSharingTypes:readingTypes:isResearchStudy:] + 583 4 HealthKit 0x004e1be9 -[HKHealthStore _validatePurposeStringsForSharingTypes:readingTypes:] + 422 5 HealthKit 0x004e137e -[HKHealthStore requestAuthorizationToShareTypes:readTypes:shouldPrompt:completion:] + 384 6 HealthKit 0x004e10cd -[HKHealthStore requestAuthorizationToShareTypes:readTypes:completion:] + 72
Apr ’20