Method: Spaceship::Portal::App.find

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

.find(bundle_id, mac: false) ⇒ App

Find a specific App ID based on the bundle_id

Parameters:

  • mac (Bool) (defaults to: false)

    Searches Mac apps if true

Returns:

  • (App)

    The app you’re looking for. This is nil if the app can’t be found.

[View source]

109
110
111
112
113
114
# File 'spaceship/lib/spaceship/portal/app.rb', line 109

def find(bundle_id, mac: false)
  raise "`bundle_id` parameter must not be nil" if bundle_id.nil?
  all(mac: mac).find do |app|
    return app if app.bundle_id.casecmp(bundle_id) == 0
  end
end