title: Creating an image format with an unknown type is an error Objective-C Xcode 8
body: <p>While choosing an image from the image picker in <code>iOS 10</code> <code>Objective-C</code> and <code>Xcode 8</code>. I am getting an error - </p>
  
  <blockquote>
    <p><strong>Creating an image format with an unknown type is an error</strong></p>
  </blockquote>
  
  <p>.</p>
  
  <p>It was ok for the previous version.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>UIImagePickerController* imgPicker=[[UIImagePickerController alloc] init];
  imgPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
  imgPicker.delegate = self;
  [self presentViewController:imgPicker animated:YES completion:nil];
  </code></pre>
  
  <p>and the delegate method to recive the image is..</p>
  
  <pre><code>- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
         [picker dismissViewControllerAnimated:YES completion:NULL];
         UIImage *myImage = [info objectForKey:UIImagePickerControllerOriginalImage];
  }
  </code></pre>
  
  <p>I also tried other delegate function..</p>
  
  <pre><code> -(void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary&lt;NSString *,id&gt; *)info{
  }
  </code></pre>
  
  <p>but error not going.<br></p>
  
  <p>I am not sure is it the bug of Xcode 8?<br> If any one faced the issue and solved please help to fix it.</p>