Reputation: 26527
How can I ensure data is encrypted when using NSData.writeToFile:options:error: with the NSDataWritingFileProtectionComplete?
According to Apple documentation:
Data protection is available on most iOS devices and is subject to the following requirements:
The file system on the user’s device must support data protection. This is true for newer devices, but for some earlier devices, the user might have to reformat the device’s disk and restore any content from a backup.
The user must have an active passcode lock set for the device.
The requirements state that user must activate passcode lock for the device, this is reinforced by the following end user documentation:
Enable data protection by configuring a passcode for your device:
http://support.apple.com/kb/HT4175
How can I find out if the iPhone user currently has a passcode set and encryption enabled? seems like the answer to this question is no longer valid.
Upvotes: 7
Views: 2925
Reputation: 12085
The requirements state that user must activate passcode lock for the device, this is reinforced by the following end user documentation.
If user doesn't have any passcode enabled the encryption would be useless. The unwanted user can use the app directly then anyway.
A solution for your problem would be to manually implement encryption for app data and use a app specific password which you ask the user on every app launch.
I've seen that system at an online banking software for iOS, but I wouldn't recommend that system since it is very annoying for the user.
Upvotes: 1