We have a lot of users reporting to us that they can't load images into our app. They just "see the spinner spin indefinitely". We now think we found the reason why:
When trying to load an asset via the PHPickerViewController
that is not downloaded yet without an active internet connection, the loadFileRepresentation
method of the item provider will just stall without reporting any progress or error. The timeout for this seems to be 5 minutes, which is way too high.
The same is true if the user disabled cellular data for Photos and attempts to load a cloud asset while not on wifi.
Steps to reproduce:
- have a photo in iCloud that is not yet downloaded
- activate Airplane Mode
- open the picker and select that photo
- see when
loadFileRepresentation
will return
Since it is clear that without an internet connection the asset can’t be downloaded, I would hope to be informed via a delegate method of the picker or the loadFileRepresentation
callback that there was an error trying to load the asset. (FB9221090)
Right now we are attempting to solve this by adding an extra timer and a network check. But this will not catch the "no cellular data allowed"-case.
Please consider some callback mechanism to the API so we can inform the user what the problem might be. Thanks!