MCPcopy Index your code
hub / github.com/NativeScript/SimDeck / recycleSimulatorForFixtureLaunch

Function recycleSimulatorForFixtureLaunch

scripts/integration/webrtc.mjs:258–280  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

256}
257
258async function recycleSimulatorForFixtureLaunch() {
259 try {
260 simdeckJson(["shutdown", simulatorUDID], {
261 timeoutMs: 180_000,
262 });
263 } catch (error) {
264 console.warn(
265 `WebRTC fixture recovery shutdown failed; continuing with boot: ${error?.message ?? error}`,
266 );
267 }
268 await retrySimdeckJson(
269 ["boot", simulatorUDID],
270 "WebRTC fixture recovery boot",
271 {
272 attempts: 3,
273 delayMs: 3_000,
274 timeoutMs: simdeckBootTimeoutMs,
275 },
276 );
277 runText("xcrun", ["simctl", "bootstatus", simulatorUDID, "-b"], {
278 timeoutMs: 600_000,
279 });
280}
281
282function simdeckJson(args, options = {}) {
283 return JSON.parse(runText(simdeck, args, options));

Callers 1

Calls 4

warnMethod · 0.80
simdeckJsonFunction · 0.70
retrySimdeckJsonFunction · 0.70
runTextFunction · 0.70

Tested by

no test coverage detected