class Fastlane::Actions::CreateAppOnlineAction

Public Class Methods

author() click to toggle source
# File fastlane/lib/fastlane/actions/create_app_online.rb, line 47
def self.author
  "KrauseFx"
end
available_options() click to toggle source
# File fastlane/lib/fastlane/actions/create_app_online.rb, line 36
def self.available_options
  require 'produce'
  Produce::Options.available_options
end
category() click to toggle source
# File fastlane/lib/fastlane/actions/create_app_online.rb, line 70
def self.category
  :app_store_connect
end
description() click to toggle source
# File fastlane/lib/fastlane/actions/create_app_online.rb, line 24
def self.description
  "Creates the given application on iTC and the Dev Portal (via _produce_)"
end
details() click to toggle source
# File fastlane/lib/fastlane/actions/create_app_online.rb, line 28
def self.details
  [
    "Create new apps on App Store Connect and Apple Developer Portal via _produce_.",
    "If the app already exists, `create_app_online` will not do anything.",
    "For more information about _produce_, visit its documentation page: [https://docs.fastlane.tools/actions/produce/](https://docs.fastlane.tools/actions/produce/)."
  ].join("\n")
end
example_code() click to toggle source
# File fastlane/lib/fastlane/actions/create_app_online.rb, line 55
def self.example_code
  [
    'create_app_online(
      username: "felix@krausefx.com",
      app_identifier: "com.krausefx.app",
      app_name: "MyApp",
      language: "English",
      app_version: "1.0",
      sku: "123",
      team_name: "SunApps GmbH" # Only necessary when in multiple teams.
    )',
    'produce   # alias for "create_app_online"'
  ]
end
is_supported?(platform) click to toggle source
# File fastlane/lib/fastlane/actions/create_app_online.rb, line 51
def self.is_supported?(platform)
  platform == :ios
end
output() click to toggle source
# File fastlane/lib/fastlane/actions/create_app_online.rb, line 41
def self.output
  [
    ['PRODUCE_APPLE_ID', 'The Apple ID of the newly created app. You probably need it for `deliver`']
  ]
end
run(params) click to toggle source
# File fastlane/lib/fastlane/actions/create_app_online.rb, line 8
def self.run(params)
  require 'produce'

  return if Helper.test?

  Produce.config = params # we alread have the finished config

  Dir.chdir(FastlaneCore::FastlaneFolder.path || Dir.pwd) do
    # This should be executed in the fastlane folder
    apple_id = Produce::Manager.start_producing.to_s

    Actions.lane_context[SharedValues::PRODUCE_APPLE_ID] = apple_id
    ENV['PRODUCE_APPLE_ID'] = apple_id
  end
end