Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS: Is there a way to delete specific files securely from the file system?

I am writing an application for iOS and a requirement I have been given is to remove files securely from the file system that may be given to my app from other applications (think 'Open in...'). These files are placed in a temp folder accessible to my app, but I'd like to securely delete these files once I have encrypted them in my own documents folder via the standard protection APIs. Any idea how to do that?

like image 754
Wayne Hartman Avatar asked Jun 18 '11 03:06

Wayne Hartman


Video Answer


1 Answers

Quotes from the paper linked to by Bavarious:

We found that none of the available software techniques for sanitizing individual files were effective.

Overall, we conclude that the increased complexity of SSDs relative to hard drives requires that SSDs provide verifiable sanitization operations.

I'm not sure the flash memory in iPhones supports these operations, but if they do I'm pretty sure that Apple will have to make them available through their API and I haven't found anything in the API for this.

So basically it doesn't seem to be possible. Perhaps you could file a bug report with Apple and ask them to fix something like this.

I think you're better of looking into the possibility to encrypt the file before saving it.

like image 195
Erik B Avatar answered Sep 28 '22 20:09

Erik B