something wrong with just first photo in Simulator photos library?

When I use PHPickerViewController to let the user choose a photo, and I run my app in the Simulator, there is some issue with just the first photo in the library. If the user chooses that photo and we say

Code Block
guard let result = results.first else { return }
let prov = result.itemProvider
print(prov.registeredTypeIdentifiers)
prov.loadObject(ofClass: UIImage.self) { (result, err) in
    print(result)
}

we are told that the registered type identifiers are ["public.jpeg", "public.heic"], and then when we ask for UIImage we get an error: "The file ... couldn’t be opened because there is no such file." And the resulting UIImage is nil.

The problem arises only for this one photo, and it is the only one with an HEIC representation. Is there some issue with photos that have an HEIC representation? How are we supposed to retrieve the image for these?

(The same code works just fine on a device. The issue arises only on the Simulator. I'm using the latest Xcode 12.2 beta.)
Post not yet marked as solved Up vote post of mattn Down vote post of mattn
2.2k views

Replies

Yes it's a known issue (63426347). It should only affect transcoding on simulators.
Cool, thanks!
Has a fix for this issue (63426347) been released yet?