class Fastlane::Actions::SetupBranchAction

Public Class Methods

authors() click to toggle source
# File lib/fastlane/plugin/branch/actions/setup_branch_action.rb, line 27
def self.authors
  [
    "Branch <integrations@branch.io>",
    "Jimmy Dee <jgvdthree@gmail.com>"
  ]
end
available_options() click to toggle source
# 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
category() click to toggle source
# File lib/fastlane/plugin/branch/actions/setup_branch_action.rb, line 62
def self.category
  :project
end
description() click to toggle source
# 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
details() click to toggle source
# File lib/fastlane/plugin/branch/actions/setup_branch_action.rb, line 34
def self.details
  render :setup_description
end
example_code() click to toggle source
# 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) click to toggle source
# File lib/fastlane/plugin/branch/actions/setup_branch_action.rb, line 58
def self.is_supported?(platform)
  platform == :ios
end
run(params) click to toggle source
# 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::Command::SetupCommand.new(config).run!
rescue StandardError => e
  UI.user_error! "Error in SetupBranchAction: #{e.message}\n#{e.backtrace}"
end