IOS – iTunes FileSharing Two-Way

data synchronizationiositunes

I use iTunes File Sharing (on Windows) to share a password file with an iOS app KeePassMini.

I am not sure if this is a one-time thing or if iTunes copies the files whenever it changes.

Ideally, iTunes would copy the file back from the device if it was changed on the device and copy it again to the device if the file was changed on the client.

In case of a conflict either the older file should be overwritten, or the action set that always the device "wins". Or alternatively just ask the user.

Best Answer

The iTunes File Sharing feature was the first option Apple supplied to allow manual transferring of files to installed 3rd party iOS apps, which support that feature. The main reason was (and still is) to put documents into an app or get them out again.

The handling of uploaded (imported) files is wholly controlled by the app allowing this feature.

As a comparison:

  • Numbers (by Apple):
    • Allows files to be uploaded
    • Uploaded documents will be moved to a place inside the app outside the reach of iTunes File Sharing, but can be placed back for retrieval (e.g. after having worked on them on the go)
  • TeamSpeak (by TeamSpeak Systems GmbH):
    • Allows to upload identities to be used with servers you like to connect to
    • Once placed in there, the file will be read and worked on upon start of the app and removed from the upload location, disallowing any identities to be extracted

Since this feature was not meant to synchronize files from inside the app with versions outside the app (e.g. on the computer), there is no synchronization databank holding records of file information in order to determine which is newer.

Furthermore, iTunes is limited on what one can do with a script to automate processes. Utilizing the File Sharing feature is not among the scriptable parts of iTunes.

Due to the lack of features, many app developers (including Apple) expanded to use different means to transfer files and even synchronize them. Many apps, if they do not use SMB, AFP or WebDAV (HTTP), use their own propriety server system to synchronize across devices.

With the introduction of iCloud, Apple allows even 3rd party apps to sync in-app content. This feature needs to be supported by the app itself to make use of it.