Reputation: 606
Currently I am working with UIImagePickerController and I have one method to open it.
let imagePickerController = UIImagePickerController()
imagePickerController.modalPresentationStyle = .fullScreen
imagePickerController.delegate = self
self.present(imagePickerController, animated: true, completion: nil)
I am testing on real device (iPad). Sometimes when I try to open the image picker, I get the following error.
2020-10-20 12:34:44.477121-0500 App[4711:2089779] [lifecycle] [u 5D794CD2-8F05-477E-BE27-2F222AC015CF:m (null)] [com.apple.mobileslideshow.photo-picker(1.0)] Connection to plugin interrupted while in use.
2020-10-20 12:34:44.489960-0500 App[4711:2089777] [lifecycle] [u 5D794CD2-8F05-477E-BE27-2F222AC015CF:m (null)] [com.apple.mobileslideshow.photo-picker(1.0)] Connection to plugin invalidated while in use.
2020-10-20 12:34:44.490563-0500 App[4711:2089767] viewServiceDidTerminateWithError:: Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted}
2020-10-20 12:34:44.490653-0500 App[4711:2089767] [Generic] -[PUPhotoPickerHostViewController viewServiceDidTerminateWithError:] Error Error Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service Connection Interrupted}
But when I remove the line
imagePickerController.modalPresentationStyle = .fullScreen
the image picker is always open.
Does someone know why I get this error?
Upvotes: 2
Views: 879
Reputation: 606
According the recommendation the problem was fixed, removing this line, it's happen on ipad.
imagePickerController.modalPresentationStyle = .fullScreen
Upvotes: 1