Class: Fastlane::Actions::SetupBranchAction

Inherits:
Action
  • Object
show all
Defined in:
lib/fastlane/plugin/branch/actions/setup_branch_action.rb

Class Method Summary collapse

Class Method Details

.authorsObject



27
28
29
30
31
32
# File 'lib/fastlane/plugin/branch/actions/setup_branch_action.rb', line 27

def self.authors
  [
    "Branch <[email protected]>",
    "Jimmy Dee <[email protected]>"
  ]
end

.available_optionsObject



52
53
54
55
56
# File 'lib/fastlane/plugin/branch/actions/setup_branch_action.rb', line 52

def self.available_options
  BranchIOCLI::Configuration::SetupConfiguration.available_options.map do |option|
    FastlaneCore::ConfigItem.from_branch_option(option)
  end
end

.categoryObject



62
63
64
# File 'lib/fastlane/plugin/branch/actions/setup_branch_action.rb', line 62

def self.category
  :project
end

.descriptionObject



20
21
22
23
24
25
# File 'lib/fastlane/plugin/branch/actions/setup_branch_action.rb', line 20

def self.description
  "This action automatically configures Xcode projects that use the Branch SDK " \
    "for Universal Links and custom URI handling. It modifies Xcode project settings and " \
    "entitlements as well as Info.plist files. It also validates the Universal Link " \
    "configuration for Xcode projects."
end

.detailsObject



34
35
36
# File 'lib/fastlane/plugin/branch/actions/setup_branch_action.rb', line 34

def self.details
  render :setup_description
end

.example_codeObject



38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/fastlane/plugin/branch/actions/setup_branch_action.rb', line 38

def self.example_code
  [
    <<-EOF
setup_branch(
  live_key: "key_live_xxxx",
  test_key: "key_test_yyyy",
  app_link_subdomain: "myapp",
  uri_scheme: "myscheme",
  xcodeproj: "MyIOSApp.xcodeproj"
)
    EOF
  ]
end

.is_supported?(platform) ⇒ Boolean

Returns:

  • (Boolean)


58
59
60
# File 'lib/fastlane/plugin/branch/actions/setup_branch_action.rb', line 58

def self.is_supported?(platform)
  platform == :ios
end

.run(params) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/fastlane/plugin/branch/actions/setup_branch_action.rb', line 10

def self.run(params)
  params.load_configuration_file "Branchfile"
  # second arg false: Don't add default values or env. vars. Let Fastlane
  # handle that. This is necessary to work with the Branchfile.
  config = BranchIOCLI::Configuration::SetupConfiguration.wrapper params, false
  BranchIOCLI::Commands::SetupCommand.new(config).run!
rescue StandardError => e
  UI.user_error! "Error in SetupBranchAction: #{e.message}\n#{e.backtrace}"
end