Module: Spaceship::Portal

Defined in:
lib/spaceship/portal/app.rb,
lib/spaceship/portal/device.rb,
lib/spaceship/portal/app_group.rb,
lib/spaceship/portal/spaceship.rb,
lib/spaceship/portal/app_service.rb,
lib/spaceship/portal/certificate.rb,
lib/spaceship/portal/provisioning_profile.rb

Defined Under Namespace

Classes: App, AppGroup, AppService, Certificate, Device, ProvisioningProfile

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



6
7
8
# File 'lib/spaceship/portal/spaceship.rb', line 6

def client
  @client
end

Class Method Details

.appClass



43
44
45
# File 'lib/spaceship/portal/spaceship.rb', line 43

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

.app_groupClass



48
49
50
# File 'lib/spaceship/portal/spaceship.rb', line 48

def app_group
  Spaceship::AppGroup.set_client(@client)
end

.app_serviceClass



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

def app_service
  Spaceship::AppService
end

.certificateClass



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

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

.deviceClass



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

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)

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

.provisioning_profileClass



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

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.



36
37
38
# File 'lib/spaceship/portal/spaceship.rb', line 36

def select_team
  @client.select_team
end