Member-only story
iOS Data Protection APIs, Using Swift
It’s automatic, but you still need to know
Data Protection is a great API. It’s so great because user data is encrypted, and the best part? Third-party Apps get this protection automatically!
Difficulty: Beginner | Easy | Normal | Challenging
This article has been developed using Xcode 14.2, and Swift 5.7.2
Prerequisites:
- You will be expected to be aware how to make a Single View Application in Swift, or the basic use of Playgrounds
Terminology
Data Protection: A file and keychain protection mechanism for supported Apple devices. It can also refer to the APIs that apps use to protect files and keychain items.
Why would we need data protection
It seems we have less and less control over our sensitive user data over time. This is possibly one of the causes of the phone hacking scandal in the UK, as celebrities made their date of birth and other information public (or the data was made public for them).
I’m sure you’ve secure data on your phone. You might even have secure notes to protect your musings from prying eyes using AES.