Skip to content

Instantly share code, notes, and snippets.

@paulz
Created April 5, 2023 04:18

Revisions

  1. paulz created this gist Apr 5, 2023.
    24 changes: 24 additions & 0 deletions create-simulators.zsh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    #!/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