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 the Documents folder on startup if necessary. The problem is that I might change my schema, but the new database won't get copied, because one already exists.
Ideally, every time I build, it would nuke the previous contents. Is this possible, or do I have to manually do it?
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.