1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
use super::XcRunSimctlInstance;
use crate::prelude::*;

pub use output::*;
mod output;

impl XcRunSimctlInstance<'_> {
	#[instrument(skip_all, ret)]
	pub fn install_booted(&self, app_path: impl AsRef<Utf8Path>) -> Result<InstallOutput> {
		let app_path = app_path.as_ref();
		InstallOutput::from_bossy_result(
			self
				.bossy_command()
				.with_arg("install")
				.with_arg("booted")
				.with_arg(app_path)
				.run_and_wait_for_output(),
		)
	}

	#[instrument(skip_all, ret)]
	pub fn install(
		&self,
		app_path: impl AsRef<Utf8Path>,
		booted_simulator: &DeviceName,
	) -> Result<InstallOutput> {
		let app_path = app_path.as_ref();
		InstallOutput::from_bossy_result(
			self
				.bossy_command()
				.with_arg("install")
				.with_arg(booted_simulator.to_string())
				.with_arg(app_path)
				.run_and_wait_for_output(),
		)
	}
}