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

Function restart

packages/server/src/core_simulator.rs:21–30  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

19}
20
21pub fn restart() -> anyhow::Result<()> {
22 let _ = Command::new("xcrun")
23 .args(["simctl", "shutdown", "all"])
24 .output();
25 stop_service()?;
26 thread::sleep(Duration::from_millis(500));
27 run_xcrun(["simctl", "list", "devices"])?;
28 print_status("restart");
29 Ok(())
30}
31
32fn stop_service() -> anyhow::Result<()> {
33 match Command::new("killall")

Callers

nothing calls this directly

Calls 5

stop_serviceFunction · 0.85
run_xcrunFunction · 0.85
print_statusFunction · 0.85
outputMethod · 0.65
sleepFunction · 0.50

Tested by

no test coverage detected