iTunes File Sharing - Can't Write to Inbox

1.9k views Asked by At

How are applications that allow content to be added through iTunes File Sharing utilizing the Inbox folder? To be specific, there are apps that process files dragged to iTunes File sharing by moving the file from the top level to the Inbox. I can watch the file disappear from view, and see the Inbox get created and its file size grow.

In our testing, the Inbox would not allow files to be moved or copied to it via NSFileManager. We see errors of the failed-to-write variety. This is consistent with the info in the File System Programming Guide, stating that it is for:

files that your app was asked to open by outside entities (e.g mail)...Your app can read and delete files in this directory but cannot create new files or write to existing files.

So we have worked around it by creating an ImportQueue folder for files that come in via iTunes and are being imported. It seems to work fine, but I'm slightly uncomfortable not knowing how and why other apps seem to utilize Inbox for file additions to their app through iTunes.

Insight greatly appreciated.

PS - I am not referring to selecting a file in a separate app (e.g. Mail, Dropbox) and choosing "Open In..." to launch my app. I am already handling that scenario successfully, and Inbox is working as expected for this scenario.

0

There are 0 answers