In iOS, there are basically five options:
Core Data- Third party database (
Realmetc.) NSKeyedArchiver/NSCodingNSUserDefaultsKeychain Services
1 (Basic data) is best when you want to save large amounts of data in a structured format, for example: your contacts / address book, music library.
2 (Realm / 3rd Party DB database) is applicable in similar scenarios to 1. The main data may be a bit dense / turgid to use, so there are third-party abstractions / alternatives.
3 (NSKeyedArchiver) is a rather interesting option; it effectively allows you to “freeze” objects (which correspond to the protocol NSCoding) and store them on disk. This is great if your data is presented as a custom object model.
4 (NSUserDefaults) microdata/. , : , , .
5 ( Keychain) ( /)
, , , Core Data NSKeyArchives UIView.
. : NSCoding, , Keychain.