By default, each sandbox contains 3 folders: Documents, Library, and TMP. Applications can only read and write files in several directories because of the sandboxed mechanism applied
Documents: Apple recommends that file data that is created in the program or browsed in the program be saved in this directory, which is included in itunes backup and restore
Library: The default settings or other status information of the stored program;
Library/caches: Store cached files, itunes does not back up this directory, files in this directory will not be deleted in the app exit
TMP: Provides a place to create temporary files on the fly.
itunes backs up all documents and library files while syncing with the iphone.
When the iphone restarts, all of the TMP files are discarded.
We create a Iossandbox project to expand the practice of sandbox and file read and write operations.
After creation, locate the corresponding directory on the emulator,
This is the catalogue all expanded.
Here are the three directories mentioned above: Documents, Library, tmp