What we call data persistence, is to save the data to the hard disk, so that the application or machine restart can also access the previous saved data, in the development of iOS has many Korean drama persistence scheme, let me introduce our common 5 kinds of solutions
1 plist file (attribute list);
2 Preference (preference setting);
3 Nskeyedarchiver (archive);
4 SQLite 3; (Lightweight database)
5 CoreData
* Sandbox mechanism
This means that the iOS program can only access the program's own directory by default, which is what we call the sandbox;
1 concrete structure of the sandbox
Directory
1 Documents
2 tmp
3Library
3.1 Caches
3.2 Preferences
Although there are so many folders in the sandbox, but each folder is very different, have their own special new, select the time to choose the appropriate directory
Data persistence scenarios in IOS