Learn how to save user settings and data for later use.
This is our fourth technique project, and we're going to go back to project 10 and fix its glaring bug: all the names and faces you add to the app don't get saved, which makes the app rather pointless!
We're going to fix this using a new class called NSUserDefaults and a new protocol called NSCoding. We'll also be using the class NSKeyedUnarchiver that you just met in project 11, along with its counterpart: NSKeyedArchiver. Putting all these together, we're going to update project 10 so that it saves its people array whenever anything is changed, then loads when the app runs.
Hacking with Swift Project 12 - Saving User Data
📄 Viewing lite version
Full site ›
⌛ 🇮🇳 India pricing being fetched…
Prices will appear once fetched — usually within a few minutes.
View in:
🇺🇸 USA