Class: Fastlane::Helper::VerifyIpaHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane/plugin/verify_ipa/helper/verify_ipa_helper.rb

Class Method Summary collapse

Class Method Details

.app_path(params, dir) ⇒ Object



4
5
6
7
8
9
10
11
12
# File 'lib/fastlane/plugin/verify_ipa/helper/verify_ipa_helper.rb', line 4

def self.app_path(params, dir)
  ipa_path = params[:ipa_path] || Actions.lane_context[Fastlane::Actions::SharedValues::IPA_OUTPUT_PATH] || ''
  UI.user_error!("Unable to find ipa file '#{ipa_path}'.") unless File.exist?(ipa_path)

  ipa_path = File.expand_path(ipa_path)
  `unzip '#{ipa_path}' -d #{dir}`
  UI.user_error!("Unable to unzip ipa '#{ipa_path}'") unless $? == 0
  Dir["#{dir}/Payload/*.app"].first
end