class Xcodeproj::XCScheme::RemoteRunnable

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)

Public Class Methods

new(target_or_node = nil, runnable_debugging_mode = nil, bundle_identifier = nil, remote_path = nil) click to toggle source

@param [Xcodeproj::Project::Object::AbstractTarget, REXML::Element] target_or_node

Either the Xcode target to reference,
or an existing XML 'RemoteRunnable' node element to reference
or nil to create an new, empty RemoteRunnable

@param [#to_s] runnable_debugging_mode

The debugging mode (usually '2')

@param [#to_s] bundle_identifier

The bundle identifier (usually 'com.apple.Carousel')

@param [#to_s] remote_path

The remote path (not required, unknown usage)
# 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

Public Instance Methods

buildable_reference() click to toggle source

@return [BuildableReference]

The buildable reference this remote runnable is gonna build and run
# File lib/xcodeproj/scheme/remote_runnable.rb, line 78
def buildable_reference
  @buildable_reference ||= BuildableReference.new @xml_element.elements['BuildableReference']
end
buildable_reference=(ref) click to toggle source

@param [BuildableReference] ref

Set the buildable reference this remote runnable is gonna build and run
# 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() click to toggle source

@return [String]

The runnable bundle identifier (usually 'com.apple.Carousel')
# File lib/xcodeproj/scheme/remote_runnable.rb, line 50
def bundle_identifier
  @xml_element.attributes['BundleIdentifier']
end
bundle_identifier=(value) click to toggle source

@param [String] value

Set the runnable bundle identifier
# File lib/xcodeproj/scheme/remote_runnable.rb, line 57
def bundle_identifier=(value)
  @xml_element.attributes['BundleIdentifier'] = value.to_s
end
remote_path() click to toggle source

@return [String]

The runnable remote path (not required, unknown usage)
# File lib/xcodeproj/scheme/remote_runnable.rb, line 64
def remote_path
  @xml_element.attributes['RemotePath']
end
remote_path=(value) click to toggle source

@param [String] value

Set the runnable remote path
# File lib/xcodeproj/scheme/remote_runnable.rb, line 71
def remote_path=(value)
  @xml_element.attributes['RemotePath'] = value.to_s
end
runnable_debugging_mode() click to toggle source

@return [String]

The runnable debugging mode (usually '2')
# File lib/xcodeproj/scheme/remote_runnable.rb, line 36
def runnable_debugging_mode
  @xml_element.attributes['runnableDebuggingMode']
end
runnable_debugging_mode=(value) click to toggle source

@param [String] value

Set the runnable debugging mode
# File lib/xcodeproj/scheme/remote_runnable.rb, line 43
def runnable_debugging_mode=(value)
  @xml_element.attributes['runnableDebuggingMode'] = value.to_s
end