Class: Xcodeproj::XCScheme::ArchiveAction

Inherits:
AbstractSchemeAction show all
Defined in:
lib/xcodeproj/scheme/archive_action.rb

Overview

This class wraps the ArchiveAction node of a .xcscheme XML file

Instance Attribute Summary

Attributes inherited from XMLElementWrapper

#xml_element

Instance Method Summary collapse

Methods inherited from AbstractSchemeAction

#add_post_action, #add_pre_action, #build_configuration, #build_configuration=, #post_actions, #post_actions=, #pre_actions, #pre_actions=

Methods inherited from XMLElementWrapper

#to_s

Constructor Details

#initialize(node = nil) ⇒ ArchiveAction



12
13
14
15
16
17
# File 'lib/xcodeproj/scheme/archive_action.rb', line 12

def initialize(node = nil)
  create_xml_element_with_fallback(node, 'ArchiveAction') do
    self.build_configuration = 'Release'
    self.reveal_archive_in_organizer = true
  end
end

Instance Method Details

#custom_archive_nameString



40
41
42
# File 'lib/xcodeproj/scheme/archive_action.rb', line 40

def custom_archive_name
  @xml_element.attributes['customArchiveName']
end

#custom_archive_name=(name) ⇒ Object



50
51
52
53
54
55
56
# File 'lib/xcodeproj/scheme/archive_action.rb', line 50

def custom_archive_name=(name)
  if name
    @xml_element.attributes['customArchiveName'] = name
  else
    @xml_element.delete_attribute('customArchiveName')
  end
end

#reveal_archive_in_organizer=(flag) ⇒ Object



31
32
33
# File 'lib/xcodeproj/scheme/archive_action.rb', line 31

def reveal_archive_in_organizer=(flag)
  @xml_element.attributes['revealArchiveInOrganizer'] = bool_to_string(flag)
end

#reveal_archive_in_organizer?Bool



23
24
25
# File 'lib/xcodeproj/scheme/archive_action.rb', line 23

def reveal_archive_in_organizer?
  string_to_bool(@xml_element.attributes['revealArchiveInOrganizer'])
end