class Firim::DetectValues
Public Instance Methods
find_app_identifier(options)
click to toggle source
# File lib/firim/detect_values.rb, line 11 def find_app_identifier(options) identifier = FastlaneCore::IpaFileAnalyser.fetch_app_identifier(options[:ipa]) if identifier.to_s.length != 0 options[:app_identifier] = identifier else UI.user_error!("Could not find ipa with app identifier '#{options[:app_identifier]}' in your iTunes Connect account (#{options[:username]} - Team: #{Spaceship::Tunes.client.team_id})") end end
find_app_name(options)
click to toggle source
# File lib/firim/detect_values.rb, line 20 def find_app_name(options) return if options[:app_name] plist = FastlaneCore::IpaFileAnalyser.fetch_info_plist_file(options[:ipa]) options[:app_name] ||= plist['CFBundleDisplayName'] options[:app_name] ||= plist['CFBundleName'] end
find_build_version(options)
click to toggle source
# File lib/firim/detect_values.rb, line 31 def find_build_version(options) plist = FastlaneCore::IpaFileAnalyser.fetch_info_plist_file(options[:ipa]) options[:app_build_version] = plist['CFBundleVersion'] end
find_firim_api_token(options)
click to toggle source
# File lib/firim/detect_values.rb, line 36 def find_firim_api_token(options) option_token = options[:firim_api_token] keychain_token = Firim::AccountManager.new(user: options[:firim_username]) token = keychain_token.token(ask_if_missing: option_token == nil) if token options[:firim_api_token] = token return end options[:firim_api_token] ||= UI.input("The API Token of fir.im: ") end
find_version(options)
click to toggle source
# File lib/firim/detect_values.rb, line 27 def find_version(options) options[:app_version] ||= FastlaneCore::IpaFileAnalyser.fetch_app_version(options[:ipa]) end
run!(options)
click to toggle source
# File lib/firim/detect_values.rb, line 3 def run!(options) find_firim_api_token(options) find_app_identifier(options) find_app_name(options) find_version(options) find_build_version(options) end