You don’t have permission to save the file “1604427874_24344399xxxxxx.json” in the folder “posts”."
Have tried manually setting the permissions of that folder like so, with no luck:
Code Block var attributes = [FileAttributeKey : Any]() attributes[.posixPermissions] = 0o777 try FileManager.default.createDirectory(at: postsDirectory, withIntermediateDirectories: true, attributes: attributes)
We suspect this is an issue in the main application as well, if the device is trying to do this download work while the device is locked.
If your code can run before the user has ever unlocked the device, the only option is ‘none’.
If not, ‘complete until first user authentication’ is a better choice.
If you code starts when the device is unlocked but then needs to work on a file after the device has been locked, you can play around with ‘complete unless open’.
Data has WritingOptions
URL has fileProtectionKey
SQLite has SQLITE_OPEN_FILEPROTECTION_*
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@apple.com"