I have read that
In iOS 4 and later, apps can use the data protection feature to add a level of security to their on-disk data. Data protection uses the built-in encryption hardware present on specific devices (such as the iPhone 3GS and iPhone 4) to store files in an encrypted format on disk. While the user’s device is locked, protected files are inaccessible even to the app that created them. The user must explicitly unlock the device (by entering the appropriate passcode) at least once before your app can access one of its protected files.
My question is that can I use it for app level protection? That is even if user didn't set a passcode for his device, all data related to my application must be encrypted using above method while application enters in background. Is it possible? Let us put it i this way "When ever my app goes in background all the secrete data in my app must be hardware encrypted and when the app resumes back, it must prompt me to enter my password" I have been searching for a solution for more than two days....Any help is greatly appreciated...
No you cannot. The convenient automatic file encryption mechanism only works with the passcode.
From the iOS App Programming Guide:
Data protection is available on most iOS devices and is subject to the following requirements: [...] The user must have an active passcode lock set for the device.
To implement an automatic encryption mechanism independent of the passcode, you need to build it on your own, e.g. using the general purpose encryption APIs.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With