crossbundle_tools/commands/apple/
run_on_device.rs1use crate::error::*;
2use std::{path::Path, process::Command};
3
4pub fn run_and_debug(
7 app_path: &Path,
8 debug: bool,
9 just_launch: bool,
10 non_interactive: bool,
11 id: Option<&String>,
12) -> Result<()> {
13 let mut cmd = Command::new("ios-deploy");
14 if debug {
15 cmd.arg("--debug");
16 }
17 if just_launch {
18 cmd.arg("--justlaunch");
19 }
20 if let Some(id) = id {
21 cmd.args(["--id", id]);
22 }
23 cmd.arg("--bundle");
24 cmd.arg(app_path);
25 if non_interactive {
26 cmd.arg("--noninteractive");
27 }
28 cmd.arg("--no-wifi");
29 cmd.output_err(true)?;
30 Ok(())
31}