How to enable build-in iOS data protection for Core Data SQLite file:
Data protection adds a level of security to files stored on disk by your app in the app’s container. It uses built-in iOS encryption to encrypt files on disk. You should enable Data Protection under Capabilities to enable the same.
Then you can use Data Protection options
- NSDataWritingFileProtectionNone (No Protection)
- NSFileProtectionComplete(CompleteProtection)
- NSDataWritingFileProtectionCompleteUnlessOpen(Protected when Device Locked)
- NSDataWritingFileProtectionCompleteUntilFirstUserAuthentication or NSFileProtectionCompleteUntilFirstUserAuthentication (Protected on first access and device has been booted).
Watch below video demonstrating the same:
No comments:
Post a Comment