Module: Spaceship::Portal

Defined in:
spaceship/lib/spaceship/portal/app.rb,
spaceship/lib/spaceship/portal/key.rb,
spaceship/lib/spaceship/portal/device.rb,
spaceship/lib/spaceship/portal/invite.rb,
spaceship/lib/spaceship/portal/person.rb,
spaceship/lib/spaceship/portal/persons.rb,
spaceship/lib/spaceship/portal/merchant.rb,
spaceship/lib/spaceship/portal/passbook.rb,
spaceship/lib/spaceship/portal/app_group.rb,
spaceship/lib/spaceship/portal/spaceship.rb,
spaceship/lib/spaceship/portal/app_service.rb,
spaceship/lib/spaceship/portal/certificate.rb,
spaceship/lib/spaceship/portal/website_push.rb,
spaceship/lib/spaceship/portal/cloud_container.rb,
spaceship/lib/spaceship/portal/provisioning_profile.rb,
spaceship/lib/spaceship/portal/provisioning_profile_template.rb

Defined Under Namespace

Classes: App, AppGroup, AppService, Certificate, CloudContainer, Device, Invite, Key, Merchant, Passbook, Person, Persons, ProvisioningProfile, ProvisioningProfileTemplate, WebsitePush

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


9
10
11
# File 'spaceship/lib/spaceship/portal/spaceship.rb', line 9

def client
  @client
end

Class Method Details

.appClass

Returns Access the apps for the spaceship.

Returns:

  • (Class)

    Access the apps for the spaceship


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

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

.app_groupClass

Returns Access the app groups for the spaceship.

Returns:

  • (Class)

    Access the app groups for the spaceship


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

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

.app_serviceClass

Returns Access app services for the spaceship.

Returns:

  • (Class)

    Access app services for the spaceship


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

def app_service
  Spaceship::Portal::AppService
end

.certificateClass

Returns Access the certificates for the spaceship.

Returns:

  • (Class)

    Access the certificates for the spaceship


84
85
86
# File 'spaceship/lib/spaceship/portal/spaceship.rb', line 84

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

.cloud_containerClass

Returns Access the iCloud Containers for the spaceship.

Returns:

  • (Class)

    Access the iCloud Containers for the spaceship


74
75
76
# File 'spaceship/lib/spaceship/portal/spaceship.rb', line 74

def cloud_container
  Spaceship::Portal::CloudContainer.set_client(@client)
end

.deviceClass

Returns Access the devices for the spaceship.

Returns:

  • (Class)

    Access the devices for the spaceship


79
80
81
# File 'spaceship/lib/spaceship/portal/spaceship.rb', line 79

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

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

  • (Spaceship::Portal::Client)

    The client the login method was called for

Raises:

  • InvalidUserCredentialsError: raised if authentication failed


24
25
26
# File 'spaceship/lib/spaceship/portal/spaceship.rb', line 24

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

.merchantClass

Returns Access the merchants for the spaceship.

Returns:

  • (Class)

    Access the merchants for the spaceship


94
95
96
# File 'spaceship/lib/spaceship/portal/spaceship.rb', line 94

def merchant
  Spaceship::Portal::Merchant.set_client(@client)
end

.passbookClass

Returns Access the pass types for the spaceship.

Returns:

  • (Class)

    Access the pass types for the spaceship


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

def passbook
  Spaceship::Portal::Passbook.set_client(@client)
end

.provisioning_profileClass

Returns Access the provisioning profiles for the spaceship.

Returns:

  • (Class)

    Access the provisioning profiles for the spaceship


89
90
91
# File 'spaceship/lib/spaceship/portal/spaceship.rb', line 89

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

.select_team(team_id: nil, team_name: nil) ⇒ String

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.

Parameters:

  • team_id (String) (defaults to: nil)

    (optional): The ID of a Developer Portal team

  • team_name (String) (defaults to: nil)

    (optional): The name of a Developer Portal team

Returns:

  • (String)

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


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

def select_team(team_id: nil, team_name: nil)
  @client.select_team(team_id: team_id, team_name: team_name)
end

.website_pushClass

Returns Access the website pushes for the spaceship.

Returns:

  • (Class)

    Access the website pushes for the spaceship


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

def website_push
  Spaceship::Portal::WebsitePush.set_client(@client)
end