views:

90

answers:

2

Hi guys

I want my app to share files via itunes file sharing. Right now all of the Documents folder is exposed to the user. The problem is that there are certain files there (let's say these are "System files") that I don't want to expose. What should I do? And if it's not possible to "hide" files, where do you think it's best to put "System files"? In the Library folder?

Thanks

+2  A: 

Yes, the Library folder is a good choice. The Documents folder should be reserved for the user's documents. Alternatively, you can prefix the filenames of your "system files" with a . or put them in a .hidden subfolder of the Documents folder. Those hidden files are currently not shown in iTunes AFAIK.

Ole Begemann
Thanks! Is there a risk that apple will reject an app because some "system files" are visible to the user?
Alex1987
+4  A: 

Apple has a Technical Q&A dealing with exactly this.

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.

Robot K