iOS Document Locations

Longtime iOS users remember that sandboxing between apps used to be almost absolute. And accessing the filesystem outside of the app's container was completely forbidden.

More recently Apple has introduced an iOS "Document Picker" that functions in a way that is similar to the "Open" dialog on macOS -- it allows you to open a file that exists inside the sandboxed container of another application on your device, or that belongs to an app like Dropbox or Resilio Sync, for example. As part of that process, Composer gains temporary permission to access that file for read/write, even though it is located outside of Composer's sandbox. This permission can only be given by you, Composer cannot gain this permission on its own without your approval.

Therefore, there are several different ways of opening (or saving/exporting) files on Composer for iOS. The first three are the most commonly used/default options, and are managed within Composer itself via the home navigation table. The fourth is handled using Apple's Document Picker.

  1. Composer has its own "Local files" folder. These files are stored inside Composer's sandbox. Composer has absolute read/write control over any file in this folder, including images that need to be shown in the document preview, for example. These files are backed up via iTunes/iCloud backup of your device.

  2. Composer has access to its own iCloud folder. Again, Composer has total read/write access to this folder. These files are kept in sync via iOS with any other devices that share the same Apple ID (e.g. other iOS devices or macOS devices). iCloud sync is generally reliable (in recent years anyway), but is unpredictable -- there are no guarantees as to exactly when the sync will occur -- it could be seconds, minutes, or even longer under certain circumstances. There is also no way to know exactly which version of a document is being used, so if you modify a document simultaneously on different devices, you typically end up with one of the versions, but its not clear which one.

  3. Composer also has a special Dropbox folder that it keeps in sync with the Dropbox server. This folder has the benefits of a local folder (read/write to all of the files). The sync engine is also designed to sync immediately when a file is changed, and very quickly (within seconds usually) when a file changes remotely while you are using the app. It doesn't sync while the program is in the background to preserve battery life. Dropbox does allow file version tracking, so if you change a file on multiple devices simultaneously, Composer attempts to merge those changes together automatically so that you keep all of your edits. On rare occasions, Dropbox will have its own sync conflict, resulting in one of those "Conflicted Copy" files. There is not much I can do about that -- you have to edit those yourself. But I almost never see those anymore (years ago they were relatively common).

  4. Composer can also use the iOS Document Picker ("Open other file...") to open files in any available location on your device. This includes:

*   "Inside" other applications on your iOS device

*   Inside the iCloud Drive folders of other applications

*   In other applications that provide "Locations".  For example, the Dropbox app can provide a Location that enables you to search your entire Dropbox folder for a file you wish to open.

This approach does have some limitations and things to be aware of:

*   You gain access to the selected file only.  You do not gain access to images or other files that may be linked to, so they will not appear in the preview.  If you need to make use of local images, you'll need to copy the file and the image files to one of the local folder options above (Local/iCloud/Dropbox) so that all files can be read.

*   Files accessed through a "Location" rely on the other application working properly.  I will continue to do what I can to ensure that Composer behaves properly when reading and writing files to these locations, but I have no control over the other application.  If you have issues, it will require some diligent testing to determine exactly where the problem lies, especially if I don't have access to the other app you are using.

*   Saving to a Location that provides sync may or may not automatically sync the file.  You may need to open the other application after saving your changes to ensure that the file is synced to the cloud/other devices.  That is completely handled by the other application, and I have no control over it.

Hopefully this helps explain the options available to you. They should allow you to work with just about any work flow, no matter where your documents are stored.

If there is something that doesn't work properly, or could use improvement -- let me know. I'll see what I can do!