Reputation: 11
We are building an application that will make use of the camera, yet do not want to retain images taken in the library/camera roll once the application has made use of the image.
The intention is to take a photo of an application form for bank loan, which we do not want a permanent record of on the user's device due to privacy concerns.
Upvotes: 1
Views: 631
Reputation: 130102
1/ Delete the file as soon as you don't need it (or maybe when your app is finished or sent to the background - depending on your user cases).
2/ Save it into temporary files. If step 1 fails, the file will still be deleted.
3/ Encrypt the file (iOS has cryptographic APIs). If you don't need to access the file when application is restarted, don't save the key anywhere. If you need it, save it to the keychain.
Upvotes: 1
Reputation: 18875
You don't have to save it to photo-album. If you need to temporarily save it just do it in applications documents folder and delete it whenever you want.
On the other hant you can't (nor should) delete photos from photo-album without user interaction.
Upvotes: 1