title: Why does the UIAlertController not allow the camera from coming up on iOS 12?
body: <p>I'm having an issue where while when the thumbnail is tapped, this action works.</p>
  <pre><code>-(IBAction)thumbnailTapped:(UIGestureRecognizer *)tap
  {
      if (_customItem.file.isEmpty)
      {
          [self openCamera];   // opens camera if no image is present
      }
      else
      {
          _isTransitioningToFullViewOrCamera = true;
          [self performSegueWithIdentifier:@&quot;CustomFileViewFromItem&quot; sender:self];  // if file is present then it shows the picture blown up.
      }
  }
  </code></pre>
  <p>and the following code is called:</p>
  <pre class="lang-objectivec prettyprint-override"><code>-(void) openCamera
  {
      _isTransitioningToFullViewOrCamera = true;
      NSString *ext = _customItem.file ? _customItem.file.ext : JpgExt;
      if ([CustomCameraController isCameraAvailableForExt:ext forViewController:self])
          [CustomCameraController launchCameraForExt:ext forViewController:self];
  }
  </code></pre>
  <p>but when called from a UIAlertAction, the camera does not open at all.</p>
  <pre><code>UIAlertController *actionSheet;
  actionSheet = [UIAlertController alertControllerWithTitle:@&quot;Select an action:&quot; message:nil preferredStyle:UIAlertControllerStyleAlert];
  
  [actionSheet addAction:[UIAlertAction actionWithTitle:@&quot;Cancel&quot; style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {      
      // Cancel button tappped.
      [self dismissViewControllerAnimated:YES completion:^{
      }];
  }]];
  
  [actionSheet addAction:[UIAlertAction actionWithTitle:@&quot;Replace&quot; style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {              
      self dismissViewControllerAnimated:YES completion:^{
      }];
      [self openCamera];
                          
  }]];
  
  // Present action sheet.
  [self presentViewController:actionSheet animated:YES completion:nil];
  </code></pre>
  <p>if <code>[self openCamera]</code> is placed within the completion block or not, it doesn't change anything.</p>
  <p>I was wondering if anyone had any experience with this; when the UIAlertController is not present (such as with single tap) the <code>[self openCamera]</code> opens up the camera and you can take a picture; however when called after the UIAlertController is presented this the camera will not open and fails silently.</p>