In theory there is this command, though I haven’t tried it yet and it requires the iPhone Simulator to be running
- xcrun simctl erase device_UUID
Another option, which also requires the iPhone Simulator to be running is:
- Within the iPhone/iPad simulator, go to the top-menu and select “iOS Simulator” -> “Reset Content and Settings…“
However what I really need is control over the images of the device.
One Stack Flow Article mentioned this location
- /Users/<username>/Library/Application Support/iPhone Simulator/User/Applications
- There are a bunch of GUID files and directories. They match up to the apps you have installed on your simulator.
I couldn’t find a folder called “iPhone Simulator”, this might be due to how my installation was setup (I followed someone else’s instructions during a knowledge dump). However I did finally find my Simulator files under “Developer”
- Under Devices is a list of Directories that use the GUID as the folder name, you can find these GUID’s in the device list in the iPhone Simulator
Now that you found the directories you can remove the images if you wish, but going to a sub-directory under data (under your device)
- I’m not sure if the sub-directory is always called “100APPLE” but that is the image directory
So resetting the iPhone Simulator, puts all the default photos back (like roaches 🙂 , they can’t be nuked by a reset). So the search continues, and I do dislike postings the same “manually” drag photos or something, that kind of defeats the purpose of automation.