When using PHPickerViewController
to load images from my photo library, several photos fail with:
Error Domain=NSItemProviderErrorDomain Code=-1200 "Could not coerce an item to class UIImage" UserInfo={NSLocalizedDescription=Could not coerce an item to class UIImage}
It appears to happen consistently on specific photos, even after restarting the device. I've set the PHPickerFilter
to .images
on the config, so I wouldn't expect casting to UIImage
to be a problem.
In what scenario would casting to UIImage
fail when the .image
filter is set? There's nothing obviously different about the photos that receive this error. In fact, other photos taken as part of the same series work just fine.
Also, it's worth noting that these photos are part of a shared album.