iPhone Documents directory and UIFileSharingEnabled, hiding certain documents

The answer given by FrenchKiss Dev is not correct. The user will still be able to see the “.data” directory in iTunes and save that locally with all the files inside it.

Instead, store private documents in Library/Preferences

According to Apple:

In addition to the directories documented previously, the entire
/Library directory has always been preserved during
updates and backups, except for /Library/Caches.
Because of this, applications can create their own directories in
/Library/ and those directories will be preserved in
backups and across updates. To minimize the risk of name collisions,
we recommend that you name this directory carefully. For example, a
directory named Private Documents would be a good choice. You should
store any files you don’t want to share to Library/Preferences
.

Leave a Comment