@@ -98,68 +98,7 @@ function start_with_snapshots() {
98
98
done
99
99
}
100
100
101
- # iOS functions
102
-
103
- SIMULATOR_DEVICE=" iPhone 15 Pro Max"
104
- SIMULATOR_OS=" 18.2"
105
-
106
- # Function to boot simulators from environment variables
107
- function start_simulators_from_env_iOS() {
108
- echo " Starting iOS simulators from environment variables"
109
-
110
-
111
- for i in {1..12}; do
112
- simulator_label=$i
113
- env_var=" IOS_${simulator_label} _SIMULATOR"
114
- simulator_udid=$( printenv " $env_var " )
115
-
116
- echo " Iteration $i : Label: $simulator_label , Env var: $env_var , UDID: $simulator_udid "
117
-
118
- if [[ -n " $simulator_udid " ]]; then
119
-
120
- echo " Booting $simulator_label simulator: $simulator_udid "
121
- boot_output=$( xcrun simctl boot " $simulator_udid " 2>&1 )
122
- boot_status=$?
123
- echo " Boot command output: $boot_output "
124
- echo " Boot command exit code: $boot_status "
125
- if [[ $boot_status -ne 0 ]]; then
126
- echo " Error: Boot command failed for $simulator_udid "
127
- return 101
128
- fi
129
- sleep 5
130
-
131
- booted=$( xcrun simctl list devices booted | grep " $simulator_udid " )
132
- echo " Post-boot status for $simulator_udid : $booted "
133
- if [[ -z " $booted " ]]; then
134
- echo " Error: Simulator $simulator_udid did not boot successfully."
135
- return 102
136
- fi
137
- else
138
- echo " Error: $simulator_label simulator (env var $env_var ) is not set"
139
- return 104
140
- fi
141
- done
142
-
143
- echo " Opening iOS Simulator app..."
144
- open -a Simulator
145
-
146
- }
147
-
148
-
149
101
150
102
151
103
152
- # Function to start the Appium server
153
- function start_appium_server() {
154
- echo " Starting Appium server..."
155
- cd forked-session-appium || return 110
156
- start-server
157
- }
158
-
159
- # Function to stop running simulators
160
- function stop_simulators_from_env_iOS() {
161
- echo " Stopping iOS simulators from environment variables..."
162
- xcrun simctl shutdown " all"
163
- }
164
-
165
104
set +x
0 commit comments