Post

Replies

Boosts

Views

Activity

Reply to How to correctly load video selected with PHPickerViewController?
Thank you for your helpful clarifications! About slowness: preferredAssetRepresentationMode was indeed the missing link. I had not seen this API before. iCloud Tracking: I have submitted an enhancement request (FB8585202) For reference, for people having trouble getting video picking to work like I did, here are the steps: Optional: Set the picker's configuration's preferredAssetRepresentationMode to current. Use itemProvider.loadFileRepresentation instead of itemProvider.loadItem. In the completion handler, copy or move the file at the provided URL to a location you control. This must complete before the completion handler returns. Now you can use the video. Thanks again!
Aug ’20
Reply to How to correctly load video selected with PHPickerViewController?
Can confirm @martinzenly 's observations. I'm on iOS 14 beta 6, Xcode beta 6. Getting non-existent URLs for videos with itemProvider.loadItem (sometimes, not always). Both local and from iCloud. Switching to itemProvider.loadFileRepresentation, however, seems to work. Although that method itself brings with it two new issues: It is incredibly slow to return local videos (in the range of several seconds, unacceptable). There doesn't appear to be a way to track iCloud download progress (required for larger videos). Among a ton of other issues. At least for me, the picker remains unusable for now.
Aug ’20