class Gym::PackageCommandGeneratorLegacy

Responsible for building the fully working xcodebuild command on Xcode < 7

Because of a known bug in PackageApplication Perl script used by Xcode the packaging process is performed with a patched version of the script.

Public Class Methods

app_thinning_path() click to toggle source
# File lib/gym/generators/package_command_generator_legacy.rb, line 71
def app_thinning_path
  ""
end
app_thinning_size_report_path() click to toggle source
# File lib/gym/generators/package_command_generator_legacy.rb, line 75
def app_thinning_size_report_path
  ""
end
appfile_path() click to toggle source
# File lib/gym/generators/package_command_generator_legacy.rb, line 50
def appfile_path
  path = Dir.glob("#{BuildCommandGenerator.archive_path}/Products/Applications/*.app").first
  path ||= Dir[BuildCommandGenerator.archive_path + "/**/*.app"].first

  return path
end
apps_path() click to toggle source
# File lib/gym/generators/package_command_generator_legacy.rb, line 79
def apps_path
  ""
end
dsym_path() click to toggle source

The path the the dsym file for this app. Might be nil

# File lib/gym/generators/package_command_generator_legacy.rb, line 63
def dsym_path
  Dir[BuildCommandGenerator.archive_path + "/**/*.app.dSYM"].last
end
generate() click to toggle source
# File lib/gym/generators/package_command_generator_legacy.rb, line 13
def generate
  print_legacy_information

  parts = ["/usr/bin/xcrun #{XcodebuildFixes.patch_package_application.shellescape} -v"]
  parts += options
  parts += pipe

  parts
end
ipa_path() click to toggle source

We export it to the temporary folder and move it over to the actual output once it's finished and valid

# File lib/gym/generators/package_command_generator_legacy.rb, line 58
def ipa_path
  File.join(temporary_output_path, "#{Gym.config[:output_name]}.ipa")
end
manifest_path() click to toggle source
# File lib/gym/generators/package_command_generator_legacy.rb, line 67
def manifest_path
  ""
end
options() click to toggle source
# File lib/gym/generators/package_command_generator_legacy.rb, line 23
def options
  options = []

  options << Shellwords.escape(appfile_path)
  options << "-o '#{ipa_path}'"
  options << "exportFormat ipa"

  if Gym.config[:provisioning_profile_path]
    options << "--embed '#{Gym.config[:provisioning_profile_path]}'"
  end

  if Gym.config[:codesigning_identity]
    options << "--sign #{Gym.config[:codesigning_identity].shellescape}"
  end

  options
end
pipe() click to toggle source
# File lib/gym/generators/package_command_generator_legacy.rb, line 41
def pipe
  [""]
end
print_legacy_information() click to toggle source
temporary_output_path() click to toggle source

Place where the IPA file will be created, so it can be safely moved to the destination folder

# File lib/gym/generators/package_command_generator_legacy.rb, line 46
def temporary_output_path
  Gym.cache[:temporary_output_path] ||= Dir.mktmpdir('gym_output')
end