Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[match] Include visionOS devices in provisioning profiles #21871

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions spaceship/lib/spaceship/connect_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,10 @@ module Platform
IOS = "IOS"
MAC_OS = "MAC_OS"
TV_OS = "TV_OS"
VISION_OS = "VISION_OS"
WATCH_OS = "WATCH_OS"

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

def self.map(platform)
return platform if ALL.include?(platform)
Expand All @@ -101,6 +102,8 @@ def self.map(platform)
return Spaceship::ConnectAPI::Platform::MAC_OS
when :ios
return Spaceship::ConnectAPI::Platform::IOS
when :xros, :visionos
return Spaceship::ConnectAPI::Platform::VISION_OS
else
raise "Cannot find a matching platform for '#{platform}' - valid values are #{ALL.join(', ')}"
end
Expand All @@ -123,7 +126,7 @@ def self.map(platform)
case platform.to_sym
when :osx, :macos, :mac
return Spaceship::ConnectAPI::Platform::MAC_OS
when :ios
when :ios, :xros, :visionos
return Spaceship::ConnectAPI::Platform::IOS
else
raise "Cannot find a matching platform for '#{platform}' - valid values are #{ALL.join(', ')}"
Expand Down
6 changes: 4 additions & 2 deletions spaceship/lib/spaceship/connect_api/models/device.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ module DeviceClass
IPOD = "IPOD"
APPLE_TV = "APPLE_TV"
MAC = "MAC"
APPLE_VISION_PRO = "APPLE_VISION_PRO"

# As of 2022-11-12, this is not officially supported by App Store Connect API
APPLE_SILICON_MAC = "APPLE_SILICON_MAC"
Expand Down Expand Up @@ -68,7 +69,7 @@ def self.devices_for_platform(platform: nil, include_mac_in_profiles: false, cli
device_platform = case platform
when :osx, :macos, :mac
Spaceship::ConnectAPI::Platform::MAC_OS
when :ios, :tvos
when :ios, :tvos, :xros, :visionos
Spaceship::ConnectAPI::Platform::IOS
when :catalyst
Spaceship::ConnectAPI::Platform::MAC_OS
Expand All @@ -86,7 +87,8 @@ def self.devices_for_platform(platform: nil, include_mac_in_profiles: false, cli
Spaceship::ConnectAPI::Device::DeviceClass::IPAD,
Spaceship::ConnectAPI::Device::DeviceClass::IPHONE,
Spaceship::ConnectAPI::Device::DeviceClass::IPOD,
Spaceship::ConnectAPI::Device::DeviceClass::APPLE_WATCH
Spaceship::ConnectAPI::Device::DeviceClass::APPLE_WATCH,
Spaceship::ConnectAPI::Device::DeviceClass::APPLE_VISION_PRO
]
when :tvos
[
Expand Down