diff --git a/deliver/lib/deliver/options.rb b/deliver/lib/deliver/options.rb index 6bd405d15b0..d39c5782af3 100644 --- a/deliver/lib/deliver/options.rb +++ b/deliver/lib/deliver/options.rb @@ -99,7 +99,7 @@ def self.available_options optional: true, default_value: "ios", verify_block: proc do |value| - UI.user_error!("The platform can only be ios, appletvos, or osx") unless %('ios', 'appletvos', 'osx').include?(value) + UI.user_error!("The platform can only be ios, appletvos, xros or osx") unless %('ios', 'appletvos', 'xros', 'osx').include?(value) end), # live version diff --git a/deliver/lib/deliver/runner.rb b/deliver/lib/deliver/runner.rb index 7a2f49d39a3..2b5ea87dad6 100644 --- a/deliver/lib/deliver/runner.rb +++ b/deliver/lib/deliver/runner.rb @@ -172,7 +172,7 @@ def verify_binary transporter = transporter_for_selected_team case platform - when "ios", "appletvos" + when "ios", "appletvos", "xros" package_path = FastlaneCore::IpaUploadPackageBuilder.new.generate( app_id: Deliver.cache[:app].id, ipa_path: ipa_path, @@ -209,7 +209,7 @@ def upload_binary transporter = transporter_for_selected_team case platform - when "ios", "appletvos" + when "ios", "appletvos", "xros" package_path = FastlaneCore::IpaUploadPackageBuilder.new.generate( app_id: Deliver.cache[:app].id, ipa_path: ipa_path, diff --git a/deliver/spec/runner_spec.rb b/deliver/spec/runner_spec.rb index 7b620fdc382..5c7c25d725e 100644 --- a/deliver/spec/runner_spec.rb +++ b/deliver/spec/runner_spec.rb @@ -82,6 +82,20 @@ def provider_ids end end + describe 'with an IPA file for visionOS' do + before do + options[:platform] = 'xros' + end + + it 'uploads the IPA for the visionOS platform' do + expect_any_instance_of(FastlaneCore::IpaUploadPackageBuilder).to receive(:generate) + .with(app_id: 'YI8C2AS', ipa_path: 'ACME.ipa', package_path: '/tmp', platform: 'xros') + .and_return('path') + expect(transporter).to receive(:upload).with(package_path: 'path', asset_path: 'ACME.ipa', platform: 'xros').and_return(true) + runner.upload_binary + end + end + describe 'with a PKG file for macOS' do before do options[:platform] = 'osx' @@ -129,6 +143,20 @@ def provider_ids end end + describe 'with an IPA file for visionOS' do + before do + options[:platform] = 'xros' + end + + it 'verifies the IPA for the visionOS platform' do + expect_any_instance_of(FastlaneCore::IpaUploadPackageBuilder).to receive(:generate) + .with(app_id: 'YI8C2AS', ipa_path: 'ACME.ipa', package_path: '/tmp', platform: 'xros') + .and_return('path') + expect(transporter).to receive(:verify).with(asset_path: "ACME.ipa", package_path: 'path', platform: "xros").and_return(true) + runner.verify_binary + end + end + describe 'with a PKG file for macOS' do before do options[:platform] = 'osx' diff --git a/fastlane/lib/fastlane/actions/app_store_build_number.rb b/fastlane/lib/fastlane/actions/app_store_build_number.rb index df01a3c415d..586215e7815 100644 --- a/fastlane/lib/fastlane/actions/app_store_build_number.rb +++ b/fastlane/lib/fastlane/actions/app_store_build_number.rb @@ -186,7 +186,7 @@ def self.available_options optional: true, default_value: "ios", verify_block: proc do |value| - UI.user_error!("The platform can only be ios, appletvos, or osx") unless %('ios', 'appletvos', 'osx').include?(value) + UI.user_error!("The platform can only be ios, appletvos, xros or osx") unless %('ios', 'appletvos', 'xros', 'osx').include?(value) end), FastlaneCore::ConfigItem.new(key: :team_name, short_option: "-e", diff --git a/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb b/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb index 364206e90fa..ab76a625708 100644 --- a/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb +++ b/fastlane/lib/fastlane/actions/docs/upload_to_app_store.md.erb @@ -374,6 +374,7 @@ The available options: - 'ios' - 'appletvos' +- 'xros' - 'osx' diff --git a/fastlane/lib/fastlane/actions/download_dsyms.rb b/fastlane/lib/fastlane/actions/download_dsyms.rb index a99ed645184..d096fa5614d 100644 --- a/fastlane/lib/fastlane/actions/download_dsyms.rb +++ b/fastlane/lib/fastlane/actions/download_dsyms.rb @@ -290,7 +290,7 @@ def self.available_options FastlaneCore::ConfigItem.new(key: :platform, short_option: "-p", env_name: "DOWNLOAD_DSYMS_PLATFORM", - description: "The app platform for dSYMs you wish to download (ios, appletvos)", + description: "The app platform for dSYMs you wish to download (ios, xros, appletvos)", default_value: :ios), FastlaneCore::ConfigItem.new(key: :version, short_option: "-v", @@ -351,7 +351,7 @@ def self.authors end def self.is_supported?(platform) - [:ios, :appletvos].include?(platform) + [:ios, :appletvos, :xros].include?(platform) end def self.example_code diff --git a/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb b/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb index d3c44d299d5..84aacdfb1f3 100644 --- a/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb +++ b/fastlane/lib/fastlane/actions/latest_testflight_build_number.rb @@ -83,7 +83,7 @@ def self.available_options optional: true, default_value: "ios", verify_block: proc do |value| - UI.user_error!("The platform can only be ios, osx, or appletvos") unless %('osx', ios', 'appletvos').include?(value) + UI.user_error!("The platform can only be ios, osx, xros or appletvos") unless %('osx', ios', 'appletvos', 'xros').include?(value) end), FastlaneCore::ConfigItem.new(key: :initial_build_number, env_name: "INITIAL_BUILD_NUMBER", diff --git a/fastlane/lib/fastlane/actions/set_changelog.rb b/fastlane/lib/fastlane/actions/set_changelog.rb index 1f503baafd7..39a8894911d 100644 --- a/fastlane/lib/fastlane/actions/set_changelog.rb +++ b/fastlane/lib/fastlane/actions/set_changelog.rb @@ -169,10 +169,10 @@ def self.available_options end), FastlaneCore::ConfigItem.new(key: :platform, env_name: "FL_SET_CHANGELOG_PLATFORM", - description: "The platform of the app (ios, appletvos, mac)", + description: "The platform of the app (ios, appletvos, xros, mac)", default_value: "ios", verify_block: proc do |value| - available = ['ios', 'appletvos', 'mac'] + available = ['ios', 'appletvos', 'xros', 'mac'] UI.user_error!("Invalid platform '#{value}', must be #{available.join(', ')}") unless available.include?(value) end) ] @@ -183,7 +183,7 @@ def self.authors end def self.is_supported?(platform) - [:ios, :appletvos, :mac].include?(platform) + [:ios, :appletvos, :xros, :mac].include?(platform) end def self.example_code diff --git a/fastlane/spec/actions_specs/set_changelog_spec.rb b/fastlane/spec/actions_specs/set_changelog_spec.rb index 445ab7e2231..612db210b61 100644 --- a/fastlane/spec/actions_specs/set_changelog_spec.rb +++ b/fastlane/spec/actions_specs/set_changelog_spec.rb @@ -7,7 +7,7 @@ it 'raises a Fastlane error' do expect { Fastlane::FastFile.new.parse(invalidPlatform_lane).runner.execute(:test) }.to( raise_error(FastlaneCore::Interface::FastlaneError) do |error| - expect(error.message).to match(/Invalid platform 'whatever', must be ios, appletvos, mac/) + expect(error.message).to match(/Invalid platform 'whatever', must be ios, appletvos, xros, mac/) end ) end diff --git a/spaceship/lib/spaceship/connect_api.rb b/spaceship/lib/spaceship/connect_api.rb index 4a3d09b9fee..06c11b40885 100644 --- a/spaceship/lib/spaceship/connect_api.rb +++ b/spaceship/lib/spaceship/connect_api.rb @@ -87,8 +87,9 @@ module Platform MAC_OS = "MAC_OS" TV_OS = "TV_OS" WATCH_OS = "WATCH_OS" + VISION_OS = "VISION_OS" - ALL = [IOS, MAC_OS, TV_OS, WATCH_OS] + ALL = [IOS, MAC_OS, TV_OS, WATCH_OS, VISION_OS] def self.map(platform) return platform if ALL.include?(platform) @@ -101,6 +102,8 @@ def self.map(platform) return Spaceship::ConnectAPI::Platform::MAC_OS when :ios return Spaceship::ConnectAPI::Platform::IOS + when :visionos, :xros + return Spaceship::ConnectAPI::Platform::VISION_OS else raise "Cannot find a matching platform for '#{platform}' - valid values are #{ALL.join(', ')}" end diff --git a/spaceship/lib/spaceship/tunes/application.rb b/spaceship/lib/spaceship/tunes/application.rb index 0f745b54662..98e53d8f733 100644 --- a/spaceship/lib/spaceship/tunes/application.rb +++ b/spaceship/lib/spaceship/tunes/application.rb @@ -72,7 +72,7 @@ def all 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) } + app.version_sets.any? { |v| (mac ? ["osx"] : ["ios", "xros", "appletvos"]).include?(v.platform) } end end diff --git a/spaceship/lib/spaceship/tunes/tunes_client.rb b/spaceship/lib/spaceship/tunes/tunes_client.rb index 297e62f7e47..8aa38495846 100644 --- a/spaceship/lib/spaceship/tunes/tunes_client.rb +++ b/spaceship/lib/spaceship/tunes/tunes_client.rb @@ -297,6 +297,8 @@ def applications "appletvos" when "MAC_OS" "osx" + when "VISION_OS" + "xros" when "IOS" "ios" else