Module: Spaceship

Defined in:
lib/spaceship.rb,
lib/spaceship/ui.rb,
lib/spaceship/app.rb,
lib/spaceship/base.rb,
lib/spaceship/client.rb,
lib/spaceship/device.rb,
lib/spaceship/version.rb,
lib/spaceship/launcher.rb,
lib/spaceship/certificate.rb,
lib/spaceship/ui/select_team.rb,
lib/spaceship/provisioning_profile.rb

Defined Under Namespace

Classes: App, Base, Certificate, Client, Device, Launcher, ProvisioningProfile

Constant Summary collapse

VERSION =
"0.0.6"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.clientObject

This client stores the default client when using the lazy syntax Spaceship.app instead of using the spaceship launcher


15
16
17
# File 'lib/spaceship.rb', line 15

def client
  @client
end

Class Method Details

.appClass

Returns Access the apps for the spaceship.

Returns:

  • (Class)

    Access the apps for the spaceship


52
53
54
# File 'lib/spaceship.rb', line 52

def app
  Spaceship::App.set_client(@client)
end

.certificateClass

Returns Access the certificates for the spaceship.

Returns:

  • (Class)

    Access the certificates for the spaceship


62
63
64
# File 'lib/spaceship.rb', line 62

def certificate
  Spaceship::Certificate.set_client(@client)
end

.deviceClass

Returns Access the devices for the spaceship.

Returns:

  • (Class)

    Access the devices for the spaceship


57
58
59
# File 'lib/spaceship.rb', line 57

def device
  Spaceship::Device.set_client(@client)
end

.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


30
31
32
# File 'lib/spaceship.rb', line 30

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

.provisioning_profileClass

Returns Access the provisioning profiles for the spaceship.

Returns:

  • (Class)

    Access the provisioning profiles for the spaceship


67
68
69
# File 'lib/spaceship.rb', line 67

def provisioning_profile
  Spaceship::ProvisioningProfile.set_client(@client)
end

.select_teamString

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

Additionally, the team ID is shown next to each team name so that the user can use the environment variable `FASTLANE_TEAM_ID` for future user.

Returns:

  • (String)

    The ID of the select team. You also get the value if the user is only in one team.


45
46
47
# File 'lib/spaceship.rb', line 45

def select_team
  @client.select_team
end