Most of the time you need to store at least a few small details about your user, like a name, a password, a session token or a Boolean value about a fired tutorial screen. While other times you need to maintain a whole bunch of data in a complex database, or just save same draft images to the disk.
The simplest way to save non-critical user data is to store in the user defaults. It’s just like a dictionary, a static collection of key-value pairs. Have you ever find some hidden toggles for an iOS app in the settings? Those values are also stored here for sure.
Sometimes you have to store critical user information, most likely a password. Then it’s time to use the built-in keychain for that, but don’t forget to save yourself some headache and use one of the nice wrappers over there.
Sometimes it’s easier to save to a file, like caching images for faster reloading, or saving a big, complex data structure of a game. Compared to Android, you can only save to your sandbox folder by default, which is not accessible by other applications.
A lot of the times you have to save and gather complex relational structures in your application, in this case you have to plan and build a database. Core Data is Apple’s database solution built on top of an SQLite database.