Every app in the iOS app has its own sandbox, and apps can only access files in the corresponding sandbox app. Of course, in the case of authorization can also access other files in the sandbox, such as access to albums or contacts,
1. There are three files documents,library,temp under the Sandbox directory, and 2 files under the Library are preferences,caches.
Documents are stored in the user's data, and the application data is stored in this directory
Temp files, open files you don't need again
Get the Sandbox directory path through the Nssearchpathfordirectoriesindomains method, the method has three parameters:
1:directory the enum value of the Nssearchpathdirectory type, the name of the directory to search for emoticons.
2:domainmask the enum value of the Nssearchpathdomainmask type, specifying the search scope. Typically, Nsuserdomainmask, which indicates that the search scope is limited to the currently applied sandbox directory.
A 3:expandtilde bool value that indicates whether to expand ~ in the returned path. If yes, expands, no indicates no expansion
Structure of the Sandbox