Today, when it comes to data persistence, there are issues related to the location of data storage. iOS is very rigorous about data security, and the sandbox mechanism (sandbox) is really hard to digest with respect to the Android system.
There are four folders in a sandbox folder before IOS8
Document stores user data, information that needs to be backed up (a folder for data persistence operations)
Library
Library/caches Store cache files, program-specific support files
Library/preferences Storage application's Preferences file
. App Package (iOS8, app is not stored in sandbox, there are separate folders to store all packages)
TMP stores temporary files. For example: Download the zip package, the decompression after the deletion-------when the memory is full, the phone will issue a warning, the warning will be the priority to clear the TMP files, so the persistence of data is not appropriate in the TMP file, priority in the document (manual operation required)
The sandbox mechanism summary is:
1. Each application is located in a tightly restricted section of the file system, and iOS creates a folder----sandbox folder for the application in the corresponding directory on the hard disk
2. Each application can only read files in the file system created for the program, the data generated when the program is run is stored in its own sandbox folder, the data between the program and the program is not interoperable--------can be installed after the jailbreak plugin ifile (File manager), Not only can you see the entire directory structure of your phone, but you can also modify folder access permissions
3. Each application is placed in a unified folder directory within the iOS system
4. The essence of a sandbox is a folder whose path is fixed, but the folder name is randomly assigned using the UUID (Global unique identifier)
Sandbox path is not visible, when the computer programming, is in the Finder library (the default is hidden, click on the upper left corner to go to the label, click the ALT key to display), in the phone can be used itools (no jailbreak) linked to the computer to see the file
*ifile is a very powerful iphone file management software, can manage files, modify file (folder) permissions, transfer data via WiFi and computer, etc.
Modify file (folder) permissions
The user, group, and global represent three numbers, each of which has three sub-items: Read, write, and execute (ignore "highest"), each with a weight of 4/2/1
That is, when read, write and execute are selected, the permission is 4+2+1=7 only select Read and write the time is 4+2=6, and so on, very easy to understand.
For example, a file's permission is 755.
iOS sandbox mechanism