Class: CocoapodsSubmit::IPABuilder
- Inherits:
-
Object
- Object
- CocoapodsSubmit::IPABuilder
- Defined in:
- lib/cocoapods_submit/ipa_builder.rb
Instance Attribute Summary collapse
-
#build_settings ⇒ Object
readonly
Returns the value of attribute build_settings.
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
-
#provisioning ⇒ Object
readonly
Returns the value of attribute provisioning.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
-
#workspace_path ⇒ Object
readonly
Returns the value of attribute workspace_path.
Instance Method Summary collapse
- #build_ipa ⇒ Object
- #bundle_identifier ⇒ Object
-
#initialize(workspace_path, target, configuration) ⇒ IPABuilder
constructor
A new instance of IPABuilder.
Constructor Details
#initialize(workspace_path, target, configuration) ⇒ IPABuilder
Returns a new instance of IPABuilder.
13 14 15 16 17 18 19 |
# File 'lib/cocoapods_submit/ipa_builder.rb', line 13 def initialize(workspace_path, target, configuration) @directory = File.join "/tmp", SecureRandom.uuid @workspace_path = workspace_path @target = target @configuration = configuration @build_settings = BuildConfiguration.new workspace_path, @target, configuration end |
Instance Attribute Details
#build_settings ⇒ Object (readonly)
Returns the value of attribute build_settings.
10 11 12 |
# File 'lib/cocoapods_submit/ipa_builder.rb', line 10 def build_settings @build_settings end |
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
9 10 11 |
# File 'lib/cocoapods_submit/ipa_builder.rb', line 9 def configuration @configuration end |
#provisioning ⇒ Object (readonly)
Returns the value of attribute provisioning.
11 12 13 |
# File 'lib/cocoapods_submit/ipa_builder.rb', line 11 def provisioning @provisioning end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
8 9 10 |
# File 'lib/cocoapods_submit/ipa_builder.rb', line 8 def target @target end |
#workspace_path ⇒ Object (readonly)
Returns the value of attribute workspace_path.
7 8 9 |
# File 'lib/cocoapods_submit/ipa_builder.rb', line 7 def workspace_path @workspace_path end |
Instance Method Details
#build_ipa ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# File 'lib/cocoapods_submit/ipa_builder.rb', line 27 def build_ipa FileUtils.mkdir_p @directory increment_bundle_version xcodebuild copy_app # codesign ipa_path = package_ipa final_ipa_path = File.join ".", File.basename(ipa_path) FileUtils.move ipa_path, final_ipa_path FileUtils.rm_rf @directory final_ipa_path end |
#bundle_identifier ⇒ Object
21 22 23 24 25 |
# File 'lib/cocoapods_submit/ipa_builder.rb', line 21 def bundle_identifier relative_info_path = configuration.build_settings["INFOPLIST_FILE"] info_path = File.join File.dirname(@target.project.path), relative_info_path Plist::parse_xml(info_path)["CFBundleIdentifier"] end |