Data persistence scenarios in IOS

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.