class Xcodeproj::XCScheme::ProfileAction
This class wraps the ProfileAction
node of a .xcscheme XML file
Public Class Methods
new(node = nil)
click to toggle source
@param [REXML::Element] node
The 'ProfileAction' XML node that this object will wrap. If nil, will create a default XML node to use.
# File lib/xcodeproj/scheme/profile_action.rb, line 12 def initialize(node = nil) create_xml_element_with_fallback(node, 'ProfileAction') do # Setup default values for other (handled) attributes self.build_configuration = 'Release' self.should_use_launch_scheme_args_env = true # Add some attributes (that are not handled by this wrapper class yet but expected in the XML) @xml_element.attributes['savedToolIdentifier'] = '' @xml_element.attributes['useCustomWorkingDirectory'] = bool_to_string(false) @xml_element.attributes['debugDocumentVersioning'] = bool_to_string(true) end end
Public Instance Methods
buildable_product_runnable()
click to toggle source
@return [BuildableProductRunnable]
The BuildableProductRunnable to launch when launching the Profile action
# File lib/xcodeproj/scheme/profile_action.rb, line 44 def buildable_product_runnable BuildableProductRunnable.new @xml_element.elements['BuildableProductRunnable'], 0 end
buildable_product_runnable=(runnable)
click to toggle source
@param [BuildableProductRunnable] runnable
Set the BuildableProductRunnable referencing the target to launch when profiling
# File lib/xcodeproj/scheme/profile_action.rb, line 51 def buildable_product_runnable=(runnable) @xml_element.delete_element('BuildableProductRunnable') @xml_element.add_element(runnable.xml_element) if runnable end
should_use_launch_scheme_args_env=(flag)
click to toggle source
@param [Bool] flag
Set Whether this Profile Action should use the same arguments and environment variables as the Launch Action.
# File lib/xcodeproj/scheme/profile_action.rb, line 37 def should_use_launch_scheme_args_env=(flag) @xml_element.attributes['shouldUseLaunchSchemeArgsEnv'] = bool_to_string(flag) end
should_use_launch_scheme_args_env?()
click to toggle source
@return [Bool]
Whether this Profile Action should use the same arguments and environment variables as the Launch Action.
# File lib/xcodeproj/scheme/profile_action.rb, line 29 def should_use_launch_scheme_args_env? string_to_bool(@xml_element.attributes['shouldUseLaunchSchemeArgsEnv']) end