Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
RequestDataAccess.m
[_healthStore requestAuthorizationToShareTypes:writeTypes readTypes:readTypes completion:^(BOOL success, NSError *error) {
if (!success) {
NSLog(@"You didn't allow HealthKit to access these read/write data types. In your app, try to handle this error gracefully when a user decides not to provide access. The error was: %@.", error);
}
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment