Protect downloaded files

113 Views Asked by At

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?

2

There are 2 best solutions below

0
zaph On BEST ANSWER

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.

2
milo526 On

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.