Created
April 5, 2023 04:18
-
-
Save paulz/cdbf346461d360caa98d2b0d807b728c to your computer and use it in GitHub Desktop.
Script to create or re-create simulators on self hosted runner
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
scriptDir=${0:a:h} | |
deleteAndCreate() { | |
xcrun simctl delete "$1" | |
xcrun simctl create "$1" com.apple.CoreSimulator.SimDeviceType.iPad-mini-6th-generation 2> /dev/null | |
} | |
createSimulatorWithContact() { | |
deleteAndCreate "ipad-runner$1" | |
xcrun simctl boot "ipad-runner$1" | |
xcrun simctl addmedia "ipad-runner$1" "$scriptDir/../UITests/contact-with-links.vcf" | |
} | |
for i in {1..7} | |
do | |
createSimulatorWithContact $i & | |
done | |
deleteAndCreate "ipad-with-external-display" & | |
wait | |
echo DONE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment