apple_clis/ios_deploy/
upload.rs

1use crate::prelude::*;
2
3use super::{detect::Device, IosDeployCLIInstance};
4
5pub use output::*;
6mod output;
7
8impl IosDeployCLIInstance {
9	#[instrument(ret, skip_all)]
10	pub fn upload_bundle(
11		&self,
12		device: &Device,
13		bundle_path: impl AsRef<Utf8Path>,
14	) -> Result<UploadOutput> {
15		let mut command = self
16			.bossy_command()
17			.with_args(["--id", &device.device_identifier])
18			.with_args(["--bundle", bundle_path.as_ref().as_str()]);
19
20		// if self.debug {
21		command.add_arg("--debug");
22		// }
23
24		UploadOutput::from_bossy_result(command.run_and_wait_for_output())
25	}
26}