I got this error when i try to choose photo from Library on real device only , i added privacy in info.plist
i use this code:
@objc func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any])
{
if let image = info[UIImagePickerController.InfoKey.originalImage] as? UIImage {
self.profileImage.image = image
}else{
debugPrint("Something went wrong")
}
dismiss(animated: true, completion: nil)
}
and it never set the image to the imageView
i use this code:
@objc func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any])
{
if let image = info[UIImagePickerController.InfoKey.originalImage] as? UIImage {
self.profileImage.image = image
}else{
debugPrint("Something went wrong")
}
dismiss(animated: true, completion: nil)
}
and it never set the image to the imageView