The first way to open a sandboxed path for a program Nssearchpathfordirectoriesindomains
Address is a string
The first parameter is the enumeration value, which enumerates the folders you want to find "which folder to go directly to modify its enumeration value NSDocumentDirectory: To enter the document folder"
Second parameter: Nsuserdomainmask represents the user's home directory
Third parameter: General set to Yes means full path is shown
Nssearchpathfordirectoriesindomains Find the sandbox path, the return value is an array, the array contains only one element, this element is the path, directly using the subscript to take out.
The second way to open the sandboxed path of the application
First step: Locate the Home directory folder
NSString *homepath = Nshomedirectory ();
NSLog (@ "HomePath =%@", HomePath);
Step two: Then stitch the folder name you want to enter
NSString *documentpathtwo = [HomePath stringbyappendingpathcomponent:@ "Documents"];
NSLog (@ "documentpathtwo =%@", documentpathtwo);
Find a library
NSString *librarypath = [HomePath stringbyappendingpathcomponent:@ "library/caches"];
NSLog (@ "%@", LibraryPath);
How to find a special folder
NSString *tmppath = Nstemporarydirectory ();
NSLog (@ "%@", Tmppath);
Breakpoints Print the file path you want
or right-click to open
How to open the sandboxed path of the program