Method: Spaceship::Portal.login

Defined in:
lib/spaceship/portal/spaceship.rb

.login(user = nil, password = nil) ⇒ Spaceship::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)

Parameters:

  • user (String) (defaults to: nil)

    (optional): The username (usually the email address)

  • password (String) (defaults to: nil)

    (optional): The password

Returns:

Raises:

  • InvalidUserCredentialsError: raised if authentication failed



21
22
23
# File 'lib/spaceship/portal/spaceship.rb', line 21

def (user = nil, password = nil)
  @client = PortalClient.(user, password)
end