Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
reflex-frp
GitHub Repository: reflex-frp/reflex-platform
Path: blob/develop/scripts/run-todomvc-in-ios-sim.sh
1 views
1
#!/usr/bin/env bash
2
set -euo pipefail
3
4
function cleanup {
5
# alternative to [ -v ] for bash prior to 4.2
6
if [ -n "${uuid-}" ]; then
7
echo "Cleaning up simulator" >&2
8
xcrun simctl shutdown $uuid 2>/dev/null
9
xcrun simctl delete $uuid
10
fi
11
}
12
13
trap cleanup EXIT
14
15
nix-build -A ghcIosSimulator64.reflex-todomvc
16
17
uuid=$(xcrun simctl create reflex-todomvc com.apple.CoreSimulator.SimDeviceType.iPhone-8 com.apple.CoreSimulator.SimRuntime.iOS-13-2)
18
open -a Simulator --args -CurrentDeviceUDID $uuid
19
xcrun simctl install $uuid `nix-build -A ghcIosSimulator64.reflex-todomvc`/reflex-todomvc.app
20
xcrun simctl launch --console $uuid reflex-todomvc
21
22