class Spaceship::Portal::App
Represents an App ID from the Developer Portal
def all
-
(Array)
- Returns all apps available for this account
def all client.apps.map { |app| self.factory(app) } end
def associate_groups(groups)
-
(App)
- The updated detailed app. This is nil if the app couldn't be found
def associate_groups(groups) app = client.associate_groups_with_app(self, groups) self.class.factory(app) end
def create!(bundle_id: nil, name: nil)
-
(App)
- The app you just created
Parameters:
-
name
(String
) -- the name of the App -
bundle_id
(String
) -- the bundle id (app_identifier) of the app associated with this provisioning profile
def create!(bundle_id: nil, name: nil) if bundle_id.end_with?('*') type = :wildcard else type = :explicit end new_app = client.create_app!(type, name, bundle_id) self.new(new_app) end
def delete!
-
(App)
- The app you just deletd
def delete! client.delete_app!(app_id) self end
def details
-
(App)
- The app you're looking for. This is nil if the app can't be found.
def details app = client.details_for_app(self) self.class.factory(app) end
def factory(attrs)
Create a new object based on a hash.
def factory(attrs) self.new(attrs) end
def find(bundle_id)
-
(App)
- The app you're looking for. This is nil if the app can't be found.
def find(bundle_id) all.find do |app| app.bundle_id == bundle_id end end
def update_service(service)
-
(App)
- The updated detailed app. This is nil if the app couldn't be found
def update_service(service) app = client.update_service_for_app(self, service) self.class.factory(app) end