0

iTunes file sharing works by exposing all the files in /Documents

But I would want to explicitly exclude certain files. Is this possible?

UPDATED:

Specifically, one of my ad network SDK is storing a mraid.js in Documents.

samwize
  • 25,675
  • 15
  • 141
  • 186
  • 2
    Yes. I am referring to [this feature](http://developer.apple.com/library/ios/#documentation/general/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html) in iOS. – samwize Jul 09 '13 at 16:30
  • Yes it is on-topic it is about "a specific programming problem" and "practical, answerable problems that are unique to the programming profession". Those are quoted from http://stackoverflow.com/help/on-topic – WolfLink Jul 09 '13 at 16:39
  • This question rather belongs to http://apple.stackexchange.com. – Ortwin Gentz Jul 09 '13 at 17:25
  • This is a programming question extending what Apple [documented](http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/PerformanceTuning/PerformanceTuning.html#//apple_ref/doc/uid/TP40007072-CH8-SW9). Please don't downvote unless you know what you are doing. – samwize Jul 16 '13 at 17:46
  • This is a good question. Why downvoting? Hate those stupid guys. I'll upvote for you. – Bagusflyer Nov 06 '14 at 07:34

3 Answers3

1

If you don't want a file shared, don't store it in the Documents folder. Use the Application Support folder for example.

Another option is that iTunes won't show any files or folders from the Documents folder that start with a dot. You could rename the files you don't want to share with a dot or put them in a subfolder whose name begins with a dot.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
  • I share Document folder so that users can share their downloaded files on their mac using itunes however, react-native AsyncStorage creates menifest.json e.g. RCTAsyncLocalStorage_V1>menifest.json file to store data which I use to save some login data and I do not want my users to see that. – Amit Bravo Apr 30 '17 at 20:25
0

There is no way to exclude files from File Sharing.

The files you need to share should be put under Documents directory and the files which you don't want to share should be kept in other directories. It'll solve the issue.

samwize
  • 25,675
  • 15
  • 141
  • 186
Midhun MP
  • 103,496
  • 31
  • 153
  • 200
0

Try looking at This Question. Also, depending on what you are storing, you can try using the NSUserDefaults instead.

Community
  • 1
  • 1
WolfLink
  • 3,308
  • 2
  • 26
  • 44