lib/spaceship/tunes/application.rb in spaceship-0.38.5 vs lib/spaceship/tunes/application.rb in spaceship-0.39.0

- old
+ new

@@ -59,13 +59,14 @@ client.applications.map { |application| self.factory(application) } end # @return (Spaceship::Tunes::Application) Returns the application matching the parameter # as either the App ID or the bundle identifier - def find(identifier) + def find(identifier, mac: false) all.find do |app| - (app.apple_id == identifier.to_s or app.bundle_id == identifier) + (app.apple_id == identifier.to_s || app.bundle_id == identifier) && + app.version_sets.any? { |v| v.platform == (mac ? "osx" : "ios") } end end # Creates a new application on iTunes Connect # @param name (String): The name of your app as it will appear on the App Store. @@ -77,17 +78,21 @@ # @param sku (String): A unique ID for your app that is not visible on the App Store. # @param bundle_id (String): The bundle ID must match the one you used in Xcode. It # can't be changed after you submit your first build. # @param company_name (String): The company name or developer name to display on the App Store for your apps. # It cannot be changed after you create your first app. - def create!(name: nil, primary_language: nil, version: nil, sku: nil, bundle_id: nil, bundle_id_suffix: nil, company_name: nil) + # @param platform (String): Platform one of (ios,osx) + # should it be an ios or an osx app + + def create!(name: nil, primary_language: nil, version: nil, sku: nil, bundle_id: nil, bundle_id_suffix: nil, company_name: nil, platform: nil) client.create_application!(name: name, primary_language: primary_language, version: version, sku: sku, bundle_id: bundle_id, bundle_id_suffix: bundle_id_suffix, - company_name: company_name) + company_name: company_name, + platform: platform) end end ##################################################### # @!group Getting information