Class: Xcodeproj::XCScheme::RemoteRunnable

Inherits:
XMLElementWrapper show all
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

#xml_element

Instance Method Summary collapse

Methods inherited from XMLElementWrapper

#to_s

Constructor Details

#initialize(target_or_node = nil, runnable_debugging_mode = nil, bundle_identifier = nil, remote_path = nil) ⇒ 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_referenceBuildableReference



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_identifierString



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_pathString



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_modeString



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