In the sandbox mechanism (sandbox) of iOS development, we learned how to view the sandbox content of the simulator. Go directly to the folder in Finder-> to enter:
/users/ligang/library/application Support/iphone simulator/
This allows you to view the sandbox contents of the emulator. In peacetime development, we should mostly use the real machine test. If you need to manipulate the files in the sandbox, we can determine whether the file operation is correct by observing the contents of the real-machine sandbox.
If you already know how to view the sandbox of a real machine, check out the other articles here, where the online site search can search for more articles about iOS development. Next, you'll learn more about how to view the real-machine sandbox in a graphic way. Interested students can continue to look down.
View the real-machine sandbox tutorialOpen devices
In the upper navigation bar of Xcode, select Window---Devices
Find your target app
Let's take Iosstrongdemo for example. The interface looks like this:
Browse the Sandbox directory structureDouble-click Iosstrongdemo
Click Show Container
After you click the Settings icon,:
This way we can only see the directory structure of the sandbox. The entity file is not visible. So, our next step is to find this sandbox.
Download Container Save to desktop
As shown, there is a download Container, which, after selection, is saved to the desktop.
Right-click to display package contents
View the Sandbox catalog
Appdatainfo.plist is the app's configuration file:
Open AppData
This is the sandbox of the app, where we can make additions and deletions to the file to check and change the operation. More content to continue to share slowly later.
How to view a real-machine sandbox (graphics tutorial)