-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopen_sim.sh
More file actions
executable file
·57 lines (46 loc) · 1.49 KB
/
open_sim.sh
File metadata and controls
executable file
·57 lines (46 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
#
# Time-stamp: <Friday 2025-03-16 11:41:12 Jess Moore>
#
# Opening mobile development simulator.
#
# Usage: bash open_sim.sh
# Platform device type and name
IPAD_SIM=A9726D34-87EE-4371-88BE-1CE198E12C4C
PIX3A_SIM=Pixel_3a_Simulator
case "${1}" in
ios)
if [[ -z $2 ]]; then
DEV_ID=${IPAD_SIM}
echo "Opening ${1} ipad simulator.";
else
DEV_ID=$2
echo "Opening ${1} ${2} simulator.";
fi;;
android)
if [[ -z $2 ]]; then
DEV_ID=${PIX3A_SIM}
echo "Opening ${1} Pixel3A simulator.";
else
DEV_ID=$2
echo "Opening ${1} ${2} simulator.";
fi;;
*)
echo "Supported options";
echo "\$1: ios, android.";
echo "\$2: provide device id (Defaults ios: ipad id, android: pixel3a id).";
exit;;
esac;
TYPE=$1
########################################################################
if [ "${TYPE}" = "ios" ]; then
########################################################################
open -a Simulator --args -CurrentDeviceUDID ${DEV_ID}
########################################################################
fi
########################################################################
if [ "${TYPE}" = "android" ]; then
########################################################################
~/Library/Android/sdk/emulator/emulator -avd Pixel_3a_Simulator &
########################################################################
fi