Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating an image format with an unknown type is an error Objective-C Xcode 8

While choosing an image from the image picker in iOS 10 Objective-C and Xcode 8. I am getting an error -

Creating an image format with an unknown type is an error

.

It was ok for the previous version.

Here is my code:

UIImagePickerController* imgPicker=[[UIImagePickerController alloc] init];
imgPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
imgPicker.delegate = self;
[self presentViewController:imgPicker animated:YES completion:nil];

and the delegate method to recive the image is..

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
       [picker dismissViewControllerAnimated:YES completion:NULL];
       UIImage *myImage = [info objectForKey:UIImagePickerControllerOriginalImage];
}

I also tried other delegate function..

 -(void) imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<NSString *,id> *)info{
}

but error not going.

I am not sure is it the bug of Xcode 8?
If any one faced the issue and solved please help to fix it.

like image 752
riaz hasan Avatar asked Oct 17 '16 12:10

riaz hasan


1 Answers

It's a bug. It's just a false warning. No bad thing is happening to the working of the app, so ignore the warning.

like image 82
matt Avatar answered Sep 21 '22 12:09

matt