deansyd / icloud_storage

A flutter plugin for uploading and downloading files to and from iCloud
MIT License
39 stars 24 forks source link

iCloud permission #32

Open erf opened 1 year ago

erf commented 1 year ago

Could there be an API call for checking if the user has signed in to iCloud and or granted iCloud permission, or is there already another way to check for this?

Now i get the following exception when i try to run ICloudStorage.gather on a simulator not signed in to iCloud:

PlatformException (PlatformException(E_CTR, Invalid containerId, or user is not signed in, or user disabled iCloud permission, null, null))

Of course i could just add a try / catch :)

Tomucha commented 1 year ago

@deansyd I see the same error: Invalid containerId, or user is not signed in, or user disabled iCloud permission

It all works as it should on several devices, but I can see in Crashlytics, that some devices throw this exception. Is there something I should do? Request some permissions, or ask user to log-in somehow? What should I do to prevent this exception?

Thanks!

Tomucha commented 1 year ago

For example these two devices show this error ... with no apparent reason - iCloud is active, user is logged, application has permission to work with it, yet - Invalid containerId, or user is not signed in, or user disabled iCloud permission ...

... very different OS versions :-/ ...