I am starting to use NSItemProvider methods hasRepresentationConforming and loadFileRepresentation for importing images, live photos and videos from PHPicker on iOS.
I would like to generate thumbnails / preview images for each imported image, live photo and video. I tried using theNSItemProvider method loadPreviewImage, but in testing with Xcode Version 12.0 (12A7209) in iOS 14 Simulator, the NSItemProvider.CompletionHandler always returns nil for the item regardless of whether I use NSData, NSURL or UIImage.
Is it best to generate thumbnails by scaling down imported images with UIGraphicsBeginImageContext and use AVAssetImageGenerator on imported videos?
Selecting any option will automatically load the page