Skip to content

Instantly share code, notes, and snippets.

@jault3
Created October 23, 2014 06:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jault3/95135a451223e5d0349a to your computer and use it in GitHub Desktop.
Save jault3/95135a451223e5d0349a to your computer and use it in GitHub Desktop.
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