-2

I'm making an application that downloads external files (images and documents) using NSURLDownlod.

But I need to keep this files protected.

If the user downloads some file using NRURLDownload, this file cannot be accessible to in another place. For example, if he plugs his ipad on macbook, we wont find this downloaded file.

In another words, they can be only accessible into his application.

Is there any way to do that?

Tunaki
  • 132,869
  • 46
  • 340
  • 423
Hykaruz
  • 5
  • 3
  • In iOS the files download are specific to the app, unlike Android. Nobody can access it, despite you have a jailbroken device. – iphonic Mar 11 '15 at 12:02
  • iphonic is right, you can still access the files from your iPad on a Mac tough, using [iExplorer](http://www.macroplant.com/iexplorer/) or other similar mac apps – Leonardo Mar 11 '15 at 13:41
  • So, if I can only access downloaded files on a Mac, this means they are not protected. I will rewrite my question to try to be more clear. – Hykaruz Mar 11 '15 at 19:42

2 Answers2

0

Welcome to stackoverflow please follow the tour and read how to ask a good question

Regarding your question:
All files that are downloaded in your app or by your app can only be accessed by your app unless you give users the option to share the files. You may use a encryption if you want to be extra secure.

Community
  • 1
  • 1
milo526
  • 5,012
  • 5
  • 41
  • 60
  • Edited* I followed the tour for sure. By the way for some reason this question was so clear to me. In apple docummentation they say this files goes to especific folder. That means users can access this files when plug his device on a macbook. – Hykaruz Mar 11 '15 at 19:52
  • I will check about encryption. Thank you very much about your help. – Hykaruz Mar 11 '15 at 19:58
0

The simplest thing you can do is save the file with the NSData method: writeToFile:options:error: and one of the NSDataWritingOptions such as NSDataWritingFileProtectionComplete.

See the Apple documentation for full details.

zaph
  • 111,848
  • 21
  • 189
  • 228