Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image not selecting #2

Open
vish02 opened this issue Jan 24, 2022 · 0 comments
Open

Image not selecting #2

vish02 opened this issue Jan 24, 2022 · 0 comments

Comments

@vish02
Copy link

vish02 commented Jan 24, 2022

AmazingPhotoPicker[33142:543580] [claims] Upload preparation for claim 752F4B17-88C3-4E19-A107-6C6ED9DD7090 completed with error: Error Domain=NSCocoaErrorDomain Code=256 "The file “version=1&uuid=99D53A1F-FEEF-40E1-8BB3-7DD55A43C8B7&mode=compatible.jpeg” couldn’t be opened."

iOS 15.0
Xcode Version 13.1 (13A1030d)

Getting error in below method. Please do needfull. Thanks!

extension ViewController: PHPickerViewControllerDelegate {
func picker(_ picker: PHPickerViewController, didFinishPicking results: [PHPickerResult]) {
dismiss(animated: true)
let itemProviders = results.map(.itemProvider)
for item in itemProviders {
if item.canLoadObject(ofClass: UIImage.self) {
item.loadObject(ofClass: UIImage.self) { (image, error) in
DispatchQueue.main.async {
if let image = image as? UIImage {
//Access your image
self.imageView.image = nil
self.imageView.image = image
}
}
}
}
}
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant