HealthKit の権限をキャンセルするユーザーをキャプチャして処理できないようです。完了ブロックは常に成功と nil エラーを返します。
[[DataManager healthStore] requestAuthorizationToShareTypes:dataTypesToWrite
readTypes:dataTypesToRead
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: %@. If you're using a simulator, try it on a device.", error);
}
if (completion)
{
completion(success,error);
}
}];