My app supports to open file via UIDocumentPickerViewController, and the app needs to detect if the opened file is writable.
We are using the "isWritableFileAtPath" method to detect if the file is writable, but iCloud Drive behaviors strangly:
Sharing a file directly with readonly permission from iCloud account A to iCloud account B, "isWritableFileAtPath" return "false" on the device of the B user - that's what we expected.
Sharing a FOLD with readonly permission from iCloud account A to iCloud account B, "isWritableFileAtPath" for a file in the shared folder returns "true" on the device of the B user - that's NOT what we expected.
Would you please help us on it?
- Is it a bug of the iCloud Drive?
- Or if there is another way to detect if the app has permission to write the file opened using UIDocumentPickerViewController ?
Can anybody help on it?
I did not find any other way to know if the opened file is writable except the API to "isWritableFileAtPath", and I did not find any topic related about the file permission in the shared readonly iCloud Drive folder.