Module: Spaceship::ConnectAPI::Platform

Defined in:
spaceship/lib/spaceship/connect_api.rb

Overview

Defined in the App Store Connect API docs: developer.apple.com/documentation/appstoreconnectapi/platform

Used for query param filters

Constant Summary collapse

IOS =
"IOS"
MAC_OS =
"MAC_OS"
TV_OS =
"TV_OS"
WATCH_OS =
"WATCH_OS"
ALL =
[IOS, MAC_OS, TV_OS, WATCH_OS]

Class Method Summary collapse

Class Method Details

.map(platform) ⇒ Object


84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'spaceship/lib/spaceship/connect_api.rb', line 84

def self.map(platform)
  return platform if ALL.include?(platform)

  # Map from fastlane input and Spaceship::TestFlight platform values
  case platform.to_sym
  when :appletvos, :tvos
    return Spaceship::ConnectAPI::Platform::TV_OS
  when :osx, :macos, :mac
    return Spaceship::ConnectAPI::Platform::MAC_OS
  when :ios
    return Spaceship::ConnectAPI::Platform::IOS
  else
    raise "Cannot find a matching platform for '#{platform}' - valid values are #{ALL.join(', ')}"
  end
end