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

[spaceship] add visionOS support for Connect API #21929

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yanniks
Copy link

@yanniks yanniks commented Mar 15, 2024

Checklist

  • I've run bundle exec rspec from the root directory to see all new and existing tests pass
  • I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
  • I see several green ci/circleci builds in the "All checks have passed" section of my PR (connect CircleCI to GitHub if not)
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.
  • I've added or updated relevant unit tests.

Motivation and Context

While #21574 already introduced basic support for visionOS, we noticed that running pilot currently fails with the following output:

[00:36:41]: ---------------------------------------
[00:36:41]: --- Step: app_store_connect_api_key ---
[00:36:41]: ---------------------------------------
[00:36:41]: ----------------------------------
[00:36:41]: --- Step: upload_to_testflight ---
[00:36:41]: ----------------------------------
[00:36:41]: Creating authorization token for App Store Connect API
[00:36:41]: Ready to upload new build to TestFlight (App: xxxxxxxxxx)...
[00:36:42]: Going to upload updated app to App Store Connect
[00:36:42]: This might take a few minutes. Please don't interrupt the script.
[00:39:35]: --------------------------------------------------------------------
[00:39:35]: Successfully uploaded package to App Store Connect. It might take a few minutes until it's visible online.
[00:39:35]: --------------------------------------------------------------------
[00:39:35]: Successfully uploaded the new binary to App Store Connect
[00:39:35]: Creating authorization token for App Store Connect API
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|                                                                                                  Lane Context                                                                                                  |
+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| DEFAULT_PLATFORM                   | ios                                                                                                                                                                       |
| PLATFORM_NAME                      | ios                                                                                                                                                                       |
| LANE_NAME                          | ios sync_codesigning                                                                                                                                                      |
…
+------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
[00:39:36]: Cannot find a matching platform for 'xros' - valid values are IOS, MAC_OS, TV_OS, WATCH_OS

Description

While investigating the issue, we noticed that the platforms that are supported by the Connect API have not been updated back then. This PR adds VISION_OS as a supported platform, as documented by the Apple documentation.
Adding VISION_OS to this list fixes the issue mentioned above.

I could not find any tests yet that validate the map function of Spaceship::ConnectAPI::Platform. If you'd like me to add tests for that, please give me a hint whether there is already something that should be extended.

Testing Steps

Create a visionOS application and try to upload it to the App Store, e.g. with pilot.

@radim93
Copy link

radim93 commented Apr 8, 2024

Hello all, do you have any idea when this commit could be merged ? Once it will be done I should be able upload to test flight as with ios and mac through ' upload_to_testflight ', right ?

@yanniks
Copy link
Author

yanniks commented Apr 8, 2024

@radim93 yes, upload_to_testflight works. As I'm no maintainer of fastlane, I unfortunately can't tell when this will be merged.

@triplef
Copy link
Contributor

triplef commented Apr 15, 2024

@rogerluan would be great if this could be merged! 🙏 This further completes visionOS support that was started in #21574.

I’ve tested this branch by using deliver to upload our visionOS app to App Store Connect and it works great.

I would vote for merging this PR in favor of #21864, which only implements a subset of the changes.

@lucgrabowski
Copy link
Contributor

@yanniks Thanks for this contribution :) This looks good to me 🔥 Could you resolve the conflict in one file?
@triplef Thanks for testing :)

@@ -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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the supported platform name here be xros or visionos?

I’m thinking it should be the latter, as xrOS is just a leftover from the beta period before Apple decided on / communicated the visionOS name, so it’s effectively superseded by visionOS (even though it’s of course still used internally by Xcode SDKs).

It would definitely feel more natural to me to write platform :visionos do ... than to use :xros, but so this is not a question specific to Deliver but a general Fastlane question.

@zsbee
Copy link

zsbee commented Apr 22, 2024

Would love to see this merged and released!

@triplef
Copy link
Contributor

triplef commented Apr 29, 2024

@yanniks any chance you could resolve the merge conflict so this can be merged? 🙏🚀

#21871 already added the changes for visionOS in spaceship/connect_api.rb, so I believe you just need to rebase and take the upstream version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants