With fastlane spaces ip, you can easily perform various operations on Apple Store Connect with commands.
This time, I will introduce how to create a SandBox account from the introduction of fastlane.
RubyGems
$ sudo gem install fastlane -NV
Homebrew
$ brew install fastlane
$ fastlane init
After setup, the fastlane directory will be created.
I will describe various Fastfile in it, but there is also an official method to describe thisFastfile in Swift.
$ fastlane init swift
This time, I will omit the simple setup after this described in Swift. Fastlane.swift docs
Write the following in Fastfile.
platform :ios do
  desc "Create Sandbox Account"
  lane :create_tester do
    require 'pp'
    require 'spaceship'
    Spaceship::Tunes.login("mail address", "password")
    desc "Select Team ID if you have multiple teams in your account"
    desc "If you don't know your team ID Spaceship::Tunes.select_If you write only the team, you can select from the candidates later"
    Spaceship::Tunes.select_team(team_id: "Team ID")
    tester = Spaceship::ConnectAPI::SandboxTester.create(
      first_name: "test",
      last_name: "name",
      email: "[email protected]",
      password: "Test1234",
      confirm_password: "Test1234",
      secret_question: "Question",
      secret_answer: "Answer",
      birth_date: "1993-03-01",
      app_store_territory: "USA"
    )
    pp tester
  end
end
Please change the information of tester arbitrarily.
Running the command in the console will create a SandBox account!
fastlane create_tester
Reference: fastlane doc
Recommended Posts