Similar to
PhotoPicker discovery error: Error Domain=PlugInKit Code=13
and also to
https://forums.developer.apple.com/thread/82105
BUT I have tried all of these suggestions and still get an error in the debug log. Running Swift 4 XCode 9A235
What was suggest at the various places was ...
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 picker exit (cancel or select), every time...
Any suggestions how to stop the error message? Other than the list of things offered at the other two links (summarized above)
my method
@objc internal func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) { imageSelected = nil if let editedImage = info["UIImagePickerControllerEditedImage"] as? UIImage { imageSelected = editedImage } else if let originalImage = info["UIImagePickerControllerOriginalImage"] as? UIImage { imageSelected = originalImage } if imageSelected != nil { handleSelectedImage() // override in subclass to do something with the returned 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) }
see in mc-system-group-container-and-mc-reading-from-public-effective-user-settings-err
Work's fine for me
if it's can help below my code (working with xcode 9)
if libraryAuthorization == .authorized { let imagePicker = UIImagePickerController() imagePicker.delegate = self imagePicker.sourceType = UIImagePickerControllerSourceType.photoLibrary imagePicker.allowsEditing = false imagePicker.view.tag = button.tag self.present(imagePicker, animated: true, completion: nil) } } func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) { if let pickerImage = info[UIImagePickerControllerOriginalImage] as? UIImage { photoContainer.addImageToButton(pickerImage, buttonTag: picker.view.tag) dismiss(animated: true) } }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With