IOS Data Storage

Source: Internet
Author: User

Previously, LP was ill and operated, and the project was tight. Some bloggers did not reply to the message. The main issue was the Omni example, which was uploaded to git for communication and learning.

The following is a summary of the previous IOS data storage experience.

After 5.0, you can selectProgramBack up to iCloud, which puts new requirements on data storage in the sandbox.

After enabling iCloud backup, the program content can be backed up to the cloud, so that user data can be used on other I devices. In this way, developers will pay attention to storing data in the sandbox. Directly upload the apple documentation.

Below is a simple translation.

ICloud and iTunes do not back up the following three folders:

    • <Application_home>/appname. app
    • <Application_home>/library/caches
    • <Application_home>/tmp

The following are rules for data storage:

    1. Key data is stored in <application_home>/documents. Critical data is a document or other data that cannot be generated by a program, such as a user.
    2. Support files are files that can be downloaded or re-created by users in a program. Their storage depends on the IOS version:
    • Ios5.1 and later are stored in <application_home>/library/application support, and the nsurlisexcludedfrombackupkey attribute is set.
    • Ios5 and earlier systems are stored in <application_home>/library/caches to avoid being backed up. The 5.0.1 system is also stored in the same location. However, you can set the attributes that are not backed up in the following ways.
    1. The cached data is stored in <application_home>/library/caches. Cache data refers to database files and downloadable files, such as the data needed by magazines, news, and map navigation applications. When the storage space is insufficient, the cached files will be deleted by the system.
    2. Temporary data <application_home>/tmp. Temporary data refers to data that does not need to be saved for a period of time. Developers should pay attention to this folder at any time.

Next we will introduce how the system processes the sandbox data after the program downloads and updates.

After the update is downloaded and installed, the system creates a folder installer, copies the user data in the original program to the new address, and then deletes the original program. user data refers to the content of the following two folders:

    • <Application_home>/Documents
    • <Application_home>/Library

 

In addition, there is a concept to mention for backup:

1. Backing up data to the remote end refers to backing up user data in the program to the iCloud ECs, but you can set to close the backup for this application.

2. Use the iCloud function in the program to store files to the cloud server. This is determined by the program function, rather than by users.

Related Article

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.