MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / shutdownSimulatorIfNeeded

Function shutdownSimulatorIfNeeded

scripts/integration/js-api.mjs:556–568  ·  view source on GitHub ↗
(udid)

Source from the content-addressed store, hash-verified

554}
555
556function shutdownSimulatorIfNeeded(udid) {
557 try {
558 runText("xcrun", ["simctl", "shutdown", udid], {
559 timeoutMs: 180_000,
560 });
561 return { ok: true, udid, action: "shutdown" };
562 } catch (error) {
563 if (String(error?.message ?? error).includes("current state: Shutdown")) {
564 return { ok: true, udid, alreadyShutdown: true };
565 }
566 throw error;
567 }
568}
569
570function eraseSimulatorReliably(udid) {
571 return retrySync(

Callers 2

mainFunction · 0.70
eraseSimulatorReliablyFunction · 0.70

Calls 1

runTextFunction · 0.70

Tested by

no test coverage detected