title: requestAccessForMediaType crashing in iOS 10
body: <p>In my app I'm using card.io to scan credit cards. It works fine in iOS 9. In iOS 10, the app is crashing and I cannot find the crash log in the xcode 8 beta 2 console as it throws a lot of garbage messages.</p>
  
  <p>And then I checked in privacy->settings to see if camera is disabled for my app, but my app is not listed in that section.Seems that iOS 10 is not grnating permission for my app to use the camera.</p>
  
  <p>I use the following code to request the permission:</p>
  
  <pre><code>-(BOOL)checkCameraPermissions{
  
      AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo];
      if(authStatus == AVAuthorizationStatusAuthorized)
      {
          // start card-io
          return YES;
      }
      else if(authStatus == AVAuthorizationStatusNotDetermined)
      {
  
          [AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo completionHandler:^(BOOL granted)
           {
               if(granted)
               {
                   //Start card-io
                   [self testIsNewCard];
               }
  
           }];
      }
      else if (authStatus == AVAuthorizationStatusRestricted)
      {
          //Alert
          // Alert camera denied
  
          UIAlertController *aCon=[UIAlertController alertControllerWithTitle:@"Camera denied" message:@"Camera cannot be used" preferredStyle:UIAlertControllerStyleAlert];
          UIAlertAction *ok =[UIAlertAction actionWithTitle:@"Ok" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
              [aCon dismissViewControllerAnimated:YES completion:nil];
          }];
          [aCon addAction:ok];
          [self presentViewController:aCon animated:YES completion:nil];
  
          return NO;
  
      }
  
      return NO;
  
  }
  </code></pre>
  
  <p>When I run this code, the authStatus is returned as <code>AVAuthorizationStatusNotDetermined</code></p>
  
  <p>and the app crashed right after it enter into the block <code>requestAccessForMediaType:AVMediaTypeVideo</code> </p>
  
  <p>There is so much of garbage logs displaying in console and I have no clue to find the crash message.</p>
  
  <p><strong>Edit:</strong> I found an option to disable the all the unnecessary logs in xcode 8. Answer posted <a href="https://stackoverflow.com/questions/37800790/hide-xcode-8-logs">here.</a> But still xcode didn't showed any crash log even after disabling the backtrace debugging.</p>
  
  <p>My xcode8 just shows this message and the app just quits:</p>
  
  <pre><code>  App[1124:226447] [access] &lt;private&gt;
  </code></pre>
  
  <p>I also tried resetting the location and privacy , but still the app crashes when trying to request the media access.</p>
  
  <p>Any ideas why this is happening ?</p>