1

I have a requirement where my app records the video files and stores them in app's documents directory. I want no other app should access these files other that my app. I have set file sharing enabled to NO. But I see some apps like iExplorer can show the video files saved under my app's documents directory. Can I know how this can be avoided.

I have also heard that by mounting the iOS device disk to any unix/linux machine can list out all the contents of the app sandbox.

So I want to know how to prevent this happening.

I tried with adding NSFileProtectionComplete as a attribute when saving the file. But this didn't solve the problem. Please help me on this.

Thanks,

Naveen
  • 646
  • 7
  • 28

1 Answers1

0

I realize this is a little old but in the hopes of helping the next person who stumbles upon this:

You're probably looking for an encryption solution, combined with the standard steps for hiding your app documents folder as you've mentioned. Encryption won't necessarily hide the files but it will make them unreadable.

NSFileProtectionComplete only encrypts files when the device is locked. See the App Programming Guide for iOS section Protecting Data Using On-Disk Encryption. Also, keep in mind that when testing this, you'll have to wait 10-20 seconds after the device is locked before trying to verify that the file is inaccessible. If you want the encryption to persist past that point you'll have to handle it yourself. Something along what's described in this SO post perhaps.

Community
  • 1
  • 1
elsamp
  • 76
  • 7