Picker Error Message on Exit (encountered while discovering extensions: Error Domain=PlugInKit Code=13) With Swift 4 - Xcode 9

前端 未结 10 1140
生来不讨喜
生来不讨喜 2021-01-31 10:04

Similar to

PhotoPicker discovery error: Error Domain=PlugInKit Code=13

and also to

https://forums.developer.apple.com/thread/82105

BUT I have t

10条回答
  •  余生分开走
    2021-01-31 10:44

    var messageImage = UIImage()
    
        @objc func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
            self.dismiss(animated: true, completion: { () -> Void in
    
            })
            if let image = info[UIImagePickerController.InfoKey.originalImage] as? UIImage
            {
                messageImage = image
    
            }
            print("Image Captured")
        }
    

    You need to fetch UIImagePickerController.InfoKey.originalImage not UIImagePickerController.InfoKey.editedImage

提交回复
热议问题