Skip to content

Commit

Permalink
Added visionOS support to Spaceship and AppStoreConnect API (#1)
Browse files Browse the repository at this point in the history
* VisionOS Device support in Spaceship

* VisionOS Platform in AppStoreConnect API

* visionOS support

* Removing merge conflict resolution leftover
  • Loading branch information
peter-gyarmati authored Feb 14, 2024
1 parent 0ede7e7 commit 1a3ca52
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
4 changes: 3 additions & 1 deletion match/lib/match/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,9 @@ def device_count_different?(profile: nil, keychain_path: nil, platform: nil, inc
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
3 changes: 2 additions & 1 deletion sigh/lib/sigh/runner.rb
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ def devices_to_use
Spaceship::ConnectAPI::Device::DeviceClass::APPLE_WATCH,
Spaceship::ConnectAPI::Device::DeviceClass::IPAD,
Spaceship::ConnectAPI::Device::DeviceClass::IPHONE,
Spaceship::ConnectAPI::Device::DeviceClass::IPOD
Spaceship::ConnectAPI::Device::DeviceClass::IPOD,
Spaceship::ConnectAPI::Device::DeviceClass::APPLE_VISION_PRO
]
when 'tvos'
[Spaceship::ConnectAPI::Device::DeviceClass::APPLE_TV]
Expand Down
8 changes: 6 additions & 2 deletions spaceship/lib/spaceship/connect_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,11 @@ 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 @@ -99,6 +101,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 @@ -121,7 +125,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
1 change: 1 addition & 0 deletions spaceship/lib/spaceship/connect_api/models/device.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,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

0 comments on commit 1a3ca52

Please sign in to comment.