Is it possible to limit iOS file sharing functionality to a subfolder in the documents directory?
My image editing app is saving some important data in the documents directory. In a tutorial I was reading this:
iTunes will then display anything you save to the Documents directory in your app to the user, when they go to the “Apps” page in iTunes and scroll to the bottom:
I have a subfolder called userImages and it would be clever to restrict file sharing only to that folder and not to everything in documents. Otherwise the user would accidently (or on purpose) mess around with files that the app depends on to work properly. This w开发者_开发技巧ould be bad.
Is there a way to restrict it to a subdirectory in documents?
No, what you should do instead is store anything you do not want users seeing in the "Library" directory for the app. Check here for a list of places you can store data:
How can I get a writable path on the iPhone?
精彩评论