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
use crate::prelude::*;

use super::XcRunInstance;

pub mod boot;
pub mod install;
pub mod list;
pub mod launch;

#[derive(Debug)]
pub struct XcRunSimctlInstance<'src> {
	exec_parent: &'src XcRunInstance,
}

impl_exec_child!(
	XcRunSimctlInstance<'src>,
	parent = XcRunInstance,
	subcommand = "simctl"
);

impl XcRunInstance {
	/// Instantiates an xcrun simctl CLI instance
	pub fn simctl(&self) -> XcRunSimctlInstance {
		XcRunSimctlInstance { exec_parent: self }
	}
}

impl XcRunSimctlInstance<'_> {
	fn bossy_command(&self) -> bossy::Command {
		self.exec_parent.bossy_command().with_arg("simctl")
	}
}