Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Snapshot of Fastlane - spaceship/lib/spaceship/tunes/application.rb
# Taken from https://github.com/fastlane/fastlane/blob/master/spaceship/lib/spaceship/tunes/application.rb
# @return (Spaceship::Tunes::Application) Returns the application matching the parameter
# as either the App ID or the bundle identifier
def find(identifier, mac: false)
all.find do |app|
((app.apple_id && app.apple_id.casecmp(identifier.to_s) == 0) || (app.bundle_id && app.bundle_id.casecmp(identifier.to_s) == 0)) &&
app.version_sets.any? { |v| (mac ? ["osx"] : ["ios", "appletvos"]).include?(v.platform) }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment