pub struct Device { /* private fields */ }
Expand description
Wrapper around a single device returned by simctl
.
Implementations§
Source§impl Device
impl Device
Sourcepub fn simctl(&self) -> &Simctl
pub fn simctl(&self) -> &Simctl
Returns an instance to the Simctl wrapper that was used to retrieve this device.
Sourcepub fn info(&self) -> &DeviceInfo
pub fn info(&self) -> &DeviceInfo
Returns information about this device. This is also accessible through
Device::deref
.
Source§impl Device
impl Device
Sourcepub fn boot(&self) -> Result<()>
pub fn boot(&self) -> Result<()>
Boots this device. If the device is already booted, this function will return an error (as does the underlying CLI).
NOTE: this does not automatically open the visual simulator interface.
Use crate::Simctl::open()
to open the visual interface.
Sourcepub fn boot_with_env<I, K, V>(&self, envs: I) -> Result<()>
pub fn boot_with_env<I, K, V>(&self, envs: I) -> Result<()>
Boots this device with the given environment variables. Do not prepend
SIMCTL_CHILD_
to the variable names: this is done automatically. If
the device is already booted, this function will return an error (as
does the underlying CLI).
NOTE: this does not automatically open the visual simulator interface.
Use crate::Simctl::open()
to open the visual interface.
Source§impl Device
impl Device
Sourcepub fn install(&self, path: &Path) -> Result<()>
pub fn install(&self, path: &Path) -> Result<()>
Installs an .app folder from the given path onto this device. If the
app (or an earlier version) already existed on this device, its app
container (see Device::get_app_container
) will be
overwritten while the other containers remain unchanged (i.e. data
persists between upgrades).
Source§impl Device
impl Device
Sourcepub fn status_bar(&self) -> StatusBar
pub fn status_bar(&self) -> StatusBar
Returns a wrapper around the simctl status_bar
subcommand.