Class: Yolo::Tools::Ios::IPA

Inherits:
Object
  • Object
show all
Defined in:
lib/yolo/tools/ios/ipa.rb

Overview

Generates iOS IPA packages using xcrun

Author:

  • Alex Fish

Class Method Summary collapse

Class Method Details

.generate(app_path, dsym_path, output_directory, &block) ⇒ Object

Generates an ipa package

Parameters:

  • app_path (String)

    The full path to the .app file

  • dsym_path (String)

    The full path to the dSYM folder

  • output_directory (String)

    The full path to the ipa save destination

  • block (Block)

    Block called on completion



17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/yolo/tools/ios/ipa.rb', line 17

def self.generate(app_path,dsym_path,output_directory, &block)
  formatter = Yolo::Formatters::ProgressFormatter.new
  formatter.generating_ipa
  name = self.app_name(app_path)
  # create directory
  self.create_directory(output_directory)
  # make ipa
  `/usr/bin/xcrun -sdk iphoneos PackageApplication -v #{app_path} -o #{output_directory}/#{name}.ipa`
  # move files
  self.move_file(dsym_path,output_directory)
  self.move_release_notes(output_directory)

  formatter.ipa_generated("#{output_directory}/#{name}.ipa")

  block.call("#{output_directory}/#{name}.ipa") if block
end