#!/usr/bin/env bash

osascript -e 'launch application "Simulator"'
xcrun simctl launch booted com.bugsnag.iOSTestApp \
    "EVENT_TYPE=$EVENT_TYPE" \
    "EVENT_DELAY=$EVENT_DELAY" \
    "BUGSNAG_API_KEY=$BUGSNAG_API_KEY" \
    "MOCK_API_PATH=http://localhost:$MOCK_API_PORT"

#!/usr/bin/env bash

osascript -e 'launch application "Simulator"'
xcrun simctl terminate booted com.bugsnag.iOSTestApp
xcrun simctl launch booted com.bugsnag.iOSTestApp \
    "EVENT_TYPE=$EVENT_TYPE" \
    "EVENT_DELAY=$EVENT_DELAY" \
    "BUGSNAG_API_KEY=$BUGSNAG_API_KEY" \
    "MOCK_API_PATH=http://localhost:$MOCK_API_PORT"

Terminate an existing instance of the app before launch
chore(maze): Terminate an existing instance of the app before launch

On High Sierra, `simctl launch` with arguments doesn't always start a
new instance of the app.
