You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I worked with that amazing script and recognized two things:
The close sim function does not work:
Simulator application name is "iOS Simulator", not "iPhone Simulator"
function _close_sim {
I know, I know. It says "iPhone Simulator". For some reason,
that's the only way Applescript can identify it.
osascript -e "tell application "iOS Simulator" to quit"
}
I had to delete the app from the simulator to get the new code version in UIAutomation so i reset all simulators before the "_xcode clean build" call by calling my "_reset_all_sim" function:
function _reset_all_sim {
instruments -s devices
| grep Simulator
| grep -o "[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}"
| while read -r line ; do
echo "Reseting Simulator with UDID: $line"
xcrun simctl erase $line
done
}
Attention: If a simulator is running it will not be cleaned. I recommend to call "_close_sim" before "_reset_all_sim" to ensure all simulators are getting cleared.
The text was updated successfully, but these errors were encountered:
I worked with that amazing script and recognized two things:
The close sim function does not work:
Simulator application name is "iOS Simulator", not "iPhone Simulator"
function _close_sim {
I know, I know. It says "iPhone Simulator". For some reason,
that's the only way Applescript can identify it.
osascript -e "tell application "iOS Simulator" to quit"
}
I had to delete the app from the simulator to get the new code version in UIAutomation so i reset all simulators before the "_xcode clean build" call by calling my "_reset_all_sim" function:
function _reset_all_sim {
instruments -s devices
| grep Simulator
| grep -o "[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}"
| while read -r line ; do
echo "Reseting Simulator with UDID: $line"
xcrun simctl erase $line
done
}
Attention: If a simulator is running it will not be cleaned. I recommend to call "_close_sim" before "_reset_all_sim" to ensure all simulators are getting cleared.
The text was updated successfully, but these errors were encountered: