Ever since the release of Xcode 5.0, there has been a new edition of the Capabilities
tab in the target settings of an Xcode project. It includes the ability to configure the entitlements on your projects App ID. One of the capabilities is Data Protection
. Enabling the setting in the target settings does no more than just:
Add the "Data Protection" entitlement to your App ID
How do I actually implement Data Protection in my application? What are the applications of Data Protection? Does it encrypt all my application data?
Data protection is an iOS feature that you use to secure your app's files and prevent unauthorized access to them. Data protection is enabled automatically when the user sets an active passcode for the device. You read and write your files normally, but the system encrypts and decrypts your content behind the scenes.
The file is stored in an encrypted format on disk and cannot be read from or written to while the device is locked or booting.
The answer is yes and no. Core Data doesn't encrypt the data you store in the persistent store, but it is possible to enable encryption.
You can turn off the failed passcode data protection feature by going to Settings > Face ID/Touch ID & Passcode > then changing the Erase Data setting.
As explained in 's documentation on the subject: Enabling Data Protection.
Data protection adds a level of security to files stored on disk by your app. Data protection uses the built-in encryption hardware present on specific devices to store files in an encrypted format on disk.
This means that the data stored will automatically be encrypted.
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