Module: SimCtl::Command::StatusBar
- Included in:
- SimCtl::Command
- Defined in:
- lib/simctl/command/status_bar.rb
Instance Method Summary collapse
-
#status_bar_clear(device) ⇒ void
Clear all status bar overrides.
-
#status_bar_override(device, overrides) ⇒ void
Set some status bar overrides.
Instance Method Details
#status_bar_clear(device) ⇒ void
This method returns an undefined value.
Clear all status bar overrides
10 11 12 13 14 15 |
# File 'lib/simctl/command/status_bar.rb', line 10 def (device) unless Xcode::Version.gte? '11.4' raise UnsupportedCommandError, 'Needs at least Xcode 11.4' end Executor.execute(command_for('status_bar', device.udid, 'clear')) end |
#status_bar_override(device, overrides) ⇒ void
This method returns an undefined value.
Set some status bar overrides
Refer to ‘xcrun simctl status_bar` for available options.
Example:
SimCtl.status_bar_override device,
time: '9:41',
dataNetwork: 'lte+',
wifiMode: 'active',
cellularMode: 'active',
batteryState: 'charging',
batteryLevel: 50
35 36 37 38 39 40 41 |
# File 'lib/simctl/command/status_bar.rb', line 35 def (device, overrides) unless Xcode::Version.gte? '11.4' raise UnsupportedCommandError, 'Needs at least Xcode 11.4' end overrides = SimCtl::StatusBarOverrides.new overrides unless overrides.is_a?(SimCtl::StatusBarOverrides) Executor.execute(command_for('status_bar', device.udid, 'override', *overrides.to_args)) end |