Tried all of these suggestions and still get the error in the debug log. Running Swift 4 XCode 9A235
What was suggest at various places
- some people said add @objc
- some people said add internal
- some people suggested adding _ and making sure using Any and not AnyObject
- some people said to use didFinishPickingImageWithInfo (this returns no image for me)
- some people said dismsss the picker, others said dismiss self, others said dismiss both
- some said add the 'Privacy... ' to plist (done)
- other suggestions here: https://stackoverflow.com/questions/44465904/photopicker-discovery-error-error-domain-pluginkit-code-13
I DID NOT get this issues in Swift 3 - previous xcode
But with Swift 4, I tried everying I saw suggested and I still get the following error
[discovery] errors encountered while discovering extensions: Error Domain=PlugInKit Code=13 "query cancelled" UserInfo={NSLocalizedDescription=query cancelled}
The picker works fine and I DO end up selecting an image from photos, but I get this error message on exit, every time... Any suggestions?
my method
@objc internal func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) {
imagePickerSelected = nil
if let editedImage = info["UIImagePickerControllerEditedImage"] as? UIImage {
imagePickerSelected = editedImage
} else if let originalImage = info["UIImagePickerControllerOriginalImage"] as? UIImage {
imagePickerSelected = originalImage
}
if imagePickerSelected != nil {
handleSelectedImage() // override in subclass to do somethign with the return image
}
picker.dismiss(animated: true, completion: nil) // mess of calling both dismiss to see if it helps - it does not
dismiss(animated: true, completion: nil)
}