Class: Xcodeproj::XCScheme::RemoteRunnable
- Inherits:
-
XMLElementWrapper
- Object
- XMLElementWrapper
- Xcodeproj::XCScheme::RemoteRunnable
- Defined in:
- lib/xcodeproj/scheme/remote_runnable.rb
Overview
This class wraps the RemoteRunnable node of a .xcscheme XML file
A RemoteRunnable is a product that is both buildable (it contains a BuildableReference) and runnable remotely (it can be launched and debugged on a remote device, i.e. an Apple Watch)
Instance Attribute Summary
Attributes inherited from XMLElementWrapper
Instance Method Summary collapse
-
#buildable_reference ⇒ BuildableReference
The buildable reference this remote runnable is gonna build and run.
- #buildable_reference=(ref) ⇒ Object
-
#bundle_identifier ⇒ String
The runnable bundle identifier (usually ‘com.apple.Carousel’).
- #bundle_identifier=(value) ⇒ Object
-
#initialize(target_or_node = nil, runnable_debugging_mode = nil, bundle_identifier = nil, remote_path = nil) ⇒ RemoteRunnable
constructor
A new instance of RemoteRunnable.
-
#remote_path ⇒ String
The runnable remote path (not required, unknown usage).
- #remote_path=(value) ⇒ Object
-
#runnable_debugging_mode ⇒ String
The runnable debugging mode (usually ‘2’).
- #runnable_debugging_mode=(value) ⇒ Object
Methods inherited from XMLElementWrapper
Constructor Details
#initialize(target_or_node = nil, runnable_debugging_mode = nil, bundle_identifier = nil, remote_path = nil) ⇒ RemoteRunnable
Returns a new instance of RemoteRunnable.
24 25 26 27 28 29 30 31 |
# File 'lib/xcodeproj/scheme/remote_runnable.rb', line 24 def initialize(target_or_node = nil, runnable_debugging_mode = nil, bundle_identifier = nil, remote_path = nil) create_xml_element_with_fallback(target_or_node, 'RemoteRunnable') do self.buildable_reference = BuildableReference.new(target_or_node) if target_or_node @xml_element.attributes['runnableDebuggingMode'] = runnable_debugging_mode.to_s if runnable_debugging_mode @xml_element.attributes['BundleIdentifier'] = bundle_identifier.to_s if bundle_identifier @xml_element.attributes['RemotePath'] = remote_path.to_s if remote_path end end |
Instance Method Details
#buildable_reference ⇒ BuildableReference
Returns The buildable reference this remote runnable is gonna build and run.
78 79 80 |
# File 'lib/xcodeproj/scheme/remote_runnable.rb', line 78 def buildable_reference @buildable_reference ||= BuildableReference.new @xml_element.elements['BuildableReference'] end |
#buildable_reference=(ref) ⇒ Object
85 86 87 88 89 |
# File 'lib/xcodeproj/scheme/remote_runnable.rb', line 85 def buildable_reference=(ref) @xml_element.delete_element('BuildableReference') @xml_element.add_element(ref.xml_element) @buildable_reference = ref end |
#bundle_identifier ⇒ String
Returns The runnable bundle identifier (usually ‘com.apple.Carousel’).
50 51 52 |
# File 'lib/xcodeproj/scheme/remote_runnable.rb', line 50 def bundle_identifier @xml_element.attributes['BundleIdentifier'] end |
#bundle_identifier=(value) ⇒ Object
57 58 59 |
# File 'lib/xcodeproj/scheme/remote_runnable.rb', line 57 def bundle_identifier=(value) @xml_element.attributes['BundleIdentifier'] = value.to_s end |
#remote_path ⇒ String
Returns The runnable remote path (not required, unknown usage).
64 65 66 |
# File 'lib/xcodeproj/scheme/remote_runnable.rb', line 64 def remote_path @xml_element.attributes['RemotePath'] end |
#remote_path=(value) ⇒ Object
71 72 73 |
# File 'lib/xcodeproj/scheme/remote_runnable.rb', line 71 def remote_path=(value) @xml_element.attributes['RemotePath'] = value.to_s end |
#runnable_debugging_mode ⇒ String
Returns The runnable debugging mode (usually ‘2’).
36 37 38 |
# File 'lib/xcodeproj/scheme/remote_runnable.rb', line 36 def runnable_debugging_mode @xml_element.attributes['runnableDebuggingMode'] end |
#runnable_debugging_mode=(value) ⇒ Object
43 44 45 |
# File 'lib/xcodeproj/scheme/remote_runnable.rb', line 43 def runnable_debugging_mode=(value) @xml_element.attributes['runnableDebuggingMode'] = value.to_s end |