Sha256: 6f5b4b803a63dd38e9f01e13dc0e6ab63f982c438ec2a0c43c280f93c04d933a

Contents?: true

Size: 1.5 KB

Versions: 491

Compression:

Stored size: 1.5 KB

Contents

require_relative 'tunes_client'

module Spaceship
  module Tunes
    class << self
      # This client stores the default client when using the lazy syntax
      # Spaceship.app instead of using the spaceship launcher
      attr_accessor :client

      # Authenticates with Apple's web services. This method has to be called once
      # to generate a valid session. The session will automatically be used from then
      # on.
      #
      # This method will automatically use the username from the Appfile (if available)
      # and fetch the password from the Keychain (if available)
      #
      # @param user (String) (optional): The username (usually the email address)
      # @param password (String) (optional): The password
      #
      # @raise InvalidUserCredentialsError: raised if authentication failed
      #
      # @return (Spaceship::Client) The client the login method was called for
      def login(user = nil, password = nil)
        @client = TunesClient.login(user, password)
      end

      # Open up the team selection for the user (if necessary).
      #
      # If the user is in multiple teams, a team selection is shown.
      # The user can then select a team by entering the number
      #
      # @param team_id (String) (optional): The ID of an App Store Connect team
      # @param team_name (String) (optional): The name of an App Store Connect team
      def select_team(team_id: nil, team_name: nil)
        @client.select_team(team_id: team_id, team_name: team_name)
      end
    end
  end
end

Version data entries

491 entries across 491 versions & 5 rubygems

Version Path
fastlane-2.226.0 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.225.0 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.224.0 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.223.1 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.223.0 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.222.0 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.221.1 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.221.0 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.220.0 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.219.0 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.218.0 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-security-patched-2.216.0 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.217.0 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.216.0 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.215.1 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.215.0 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-mercafacil-2.214.0 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.214.0 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.213.0 spaceship/lib/spaceship/tunes/spaceship.rb
fastlane-2.212.2 spaceship/lib/spaceship/tunes/spaceship.rb