I'm using KIF to do some testing and it uses a unit test target. Since I can't access XCUIApplication , I'm not able to reproduce an app delete which I would need to reset the app state to run the following test case (so between tests). Furthermore, I've tried running this script as a build phase script without success :
/usr/bin/xcrun simctl uninstall booted com.mycompany.bundleId
I've added it to the same test target where I'm doing the test cases, check how here