Im writing an automated test that will use the Instruments automator to run a series of UX tests on my application. The problem is, I need the app to run on a fresh install for the specific set of tests that I am running. Is there a way to delete an app in the simulator through the command line?
Specifically, I am looking for something like this:
xcodeBuild -delete myApp.app
I actually ended up using the solution found here: https://stackoverflow.com/a/5128616/608739
The apple script works great and gets around all those pesky simulator issues.
————— OLD POST ——————-
Using jpancoast’s lead, I modified his script to find and clear the latest version of the app on simulator:
The script checks to see if we are currently running on device or not. It then finds the folder corresponding to the latest SDK (assuming your project is building on that SDK) and deletes all applications associated with that SDK version. Further refinement can be made to only delete specific apps you are interested in.