Securing user data with Keychain for iOS

Kamil
Snowdog Labs

--

Introduction

If you’ve ever built an iOS app, you’ve probably come across a situation where you need to store sensitive information on behalf of the user. For this, Apple’s Keychain Services is your guy because it’s great for securing sensitive data. UserDefaults are enough when you’re dealing with preferences, but you should never store credentials in them. Keychain is not limited to passwords; you can store any personal data, such as credit card information or even short notes. Keychain can also keep items that the user needs but may not be aware of, for example cryptographic keys and certificates that you manage. Keep in mind that Keychain is stored in a secure enclave in the A7 chip or newer. There are many wrappers out there that allow you to use Keychain, but I want to show that you can also do it yourself quite easily.

Read the rest of the article on our blog.

--

--