Class: Fastlane::Apprepo::DetectValues

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane/plugin/apprepo/detect_values.rb,
lib/fastlane/plugin/apprepo/helper/detect_values.rb

Overview

This class is responsible for detecting values from IPA.

Instance Method Summary collapse

Instance Method Details

#find_app_identifier(options) ⇒ Object



11
12
13
14
15
16
17
18
19
# File 'lib/fastlane/plugin/apprepo/detect_values.rb', line 11

def find_app_identifier(options)
  return if options[:app_identifier]
  if options[:ipa]
    # identifier = Apprepo::Analyser.fetch_app_identifier(options[:ipa])
  end
  options[:app_identifier] = identifier unless identifier.to_s.empty?
  input_message = 'The Bundle Identifier of your App: '
  options[:app_identifier] ||= UI.input(input_message)
end

#find_version(options) ⇒ Object



21
22
23
24
25
26
# File 'lib/fastlane/plugin/apprepo/detect_values.rb', line 21

def find_version(options)
  unless options[:ipa].nil?
    opt = Apprepo::Analyser.new(options)
    options[:app_version] ||= opt.fetch_app_version(options[:ipa])
  end
end

#run!(options) ⇒ Object



6
7
8
9
# File 'lib/fastlane/plugin/apprepo/detect_values.rb', line 6

def run!(options)
  find_app_identifier(options)
  find_version(options)
end