Find the Sandbox path method: (The method of the online post does not work, you can try the first kind)
1. Direct Printing nshomedirectory ()
i.e. NSLog (@ "%@", Nshomedirectory ());
For Nshomedirectory () The official description is:
When the Mac prints it out, it gets the path to the sandbox, for example, I get the print result:
/users/zzz/library/developer/coresimulator/devices/80ca1c69-e887-4f00-8508-7a9f590204a4/data/containers/data/ Application/4199a643-3722-4a89-a423-13833a2fec21
Which ZZZ is my computer's user name, the path of the sandbox is to application so far, click to go after you can directly reach the sandbox folder, after everyone to create a surrogate to the desktop after the convenience of use.
The following is a general way to find the sandbox path online
2. Ways to find sandbox paths online
(1) First open the terminal, turn on the view hidden file permissions, the instructions are as follows
command to display Mac hidden files: Defaults write Com.apple.finder appleshowallfiles-bool true
command to hide Mac hidden files: Defaults write Com.apple.finder Appleshowallfiles-bool false
(2) After you lose, click Enter, exit the terminal, and then restart the Finder (click on the top left Apple flag, force exit)
Then step into: Users/username/library/application support/iphone simulator/
However.. I did not succeed using the second method, so just use the first method as unsuccessful.
iOS development looking for sandbox paths