Error dismissing ImagePickerController

I am working on top of the ARKit Demo App. I created a button that opens up my photo library so that I could select a photo and store it in an UIImage variable. I am getting the error:


PhotoPicker discovery error: Error Domain=PlugInKit Code=13 "query cancelled" UserInfo={NSLocalizedDescription=query cancelled}


after I select a photo from the Photo Library on my phone. I think the error occurs at the line, "self.dismiss(animated: false, completion: nil)", where self is the main ViewController.

I made sure to add the NSPhotoLibraryUsageDescription key in my Info.plist with a description.

Hello everyone,


I had the same issue, but on one point in my app the image picker worked fine, and on another it didn't. Then I realized that I need to add not only UIImagePickerControllerDelegate but also UINavigationControllerDelegate to my UIViewController class. This fixed the issue that the delegate method "didFinishPickingMediaWithInfo" is not being entered at all.


Hope this helps anyone having the same issue as me.

I solved this issue by removing "private" before func imagePickerController

Error dismissing ImagePickerController
 
 
Q