Is there a straightforward way to clean up the directory where xcode deploys an app when building for the iPhone simulator? I have a sqlite database that gets copied into t
In XCode, go to the Window menu option, select Devices and then you can just delete the ones you no longer need.
For Xcode <= 5
I added the following to my ~/.bash_profile
alias cleansim='rm -r ~/Library/Application\ Support/iPhone\ Simulator/5.1/Applications/*'
It just nukes all of the apps on the sim.
it may be overkill but..
you can also use the menu and 'Reset Content and Settings...'
From Apples Dev Resources:
To set the user content and settings of the simulator to their factory state and remove the applications you have installed, choose iPhone Simulator > Reset Content and Settings.
This resembles:
As of Xcode 6:
xcrun simctl erase <sim udid>
<- resets the simulator.
The simulator installs apps into:
"$HOME/Library/Application Support/iPhone Simulator/User/Applications"
Also check:
"$HOME/Library/Developer/CoreSimulator/Devices"
The GUID files and directories match up to the simulator's installed apps.
Manually delete all those files/directories to remove all applications from the simulator.
I know there is some way to add scripts to the build process in XCode.
Also it looks as if XCode changes the GUID it uses each build (the directory where my app sits changes between builds in XCode), so trying to delete the same directory all the time won't work. If you are only working on one app at a time then clearing out the entire directory would be an option.