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

Support visionos in pod lib lint --platforms= and use xros for Fourflusher #12159

Merged

Conversation

MagnificentMiles
Copy link
Contributor

@MagnificentMiles MagnificentMiles commented Nov 22, 2023

Motivation

Fixes #11965 (comment)

And possibly Firebase and RevenueCat

Description

  • Added visionos to --platforms in pod lib lint
  • Changed the validator to use xros when passing into Fourflusher
    • Prevents ERROR | [visionOS] unknown: Encountered an unknown error (Could not find a xsossimulator (valid values: ios, tvos, watchos, xros). Ensure that Xcode -> Window -> Devices has at least onexsos simulator listed or otherwise add one.

And this is my first CocoaPods pull request so let me know if there is anything else I can do make this PR easier to merge!

@MagnificentMiles MagnificentMiles changed the title Support visionos in pod lib lint --platforms= and use xros for Fourflush Support visionos in pod lib lint --platforms= and use xros for Fourflush Nov 22, 2023
@MagnificentMiles MagnificentMiles changed the title Support visionos in pod lib lint --platforms= and use xros for Fourflush Support visionos in pod lib lint --platforms= and use xros for Fourflush Nov 22, 2023
@MagnificentMiles MagnificentMiles changed the title Support visionos in pod lib lint --platforms= and use xros for Fourflush Support visionos in pod lib lint --platforms= and use xros for Fourflusher Nov 22, 2023
@@ -1108,7 +1108,7 @@ def xcodebuild(action, scheme, configuration, deployment_target:)
command += Fourflusher::SimControl.new.destination(:oldest, 'tvOS', deployment_target)
when :visionos
command += %w(CODE_SIGN_IDENTITY=- -sdk xrsimulator)
command += Fourflusher::SimControl.new.destination(:oldest, 'visionOS', deployment_target)
command += Fourflusher::SimControl.new.destination(:oldest, 'xrOS', deployment_target)
Copy link
Member

Choose a reason for hiding this comment

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

Apple has been changing all xrOS references to visionOS. Does this still work with Xcode 15.1? Should Fourflusher be changed instead?

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this fix sufficient? CocoaPods/Core#763

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Apple has been changing all xrOS references to visionOS. Does this still work with Xcode 15.1? Should Fourflusher be changed instead?

I tested this in Xcode 15.1 Beta 3 with xrOS and it worked. But I'm happy to make the change in Fourflusher instead!

It seems like Fourflusher just passes the value directly into xcodebuild so probably shouldn't make the change there? Might be better to document that xrOS is the value that is supported as of 15.1 incase it changes in future versions of Xcode? Or should that logic be contained in Fourflusher? I'm not super familiar with Fourflusher's design 🤷‍♂️

CHANGELOG.md Outdated Show resolved Hide resolved
@joshdholtz
Copy link

This seems to work for us at RevenueCat!

@dnkoutso @paulb777 Can we get this merged? 😇

@@ -25,7 +25,7 @@ def self.options
['--use-static-frameworks', 'Lint uses static frameworks during installation'],
["--sources=#{Pod::TrunkSource::TRUNK_REPO_URL}", 'The sources from which to pull dependent pods ' \
"(defaults to #{Pod::TrunkSource::TRUNK_REPO_URL}). Multiple sources must be comma-delimited"],
['--platforms=ios,macos', 'Lint against specific platforms (defaults to all platforms supported by the ' \
['--platforms=ios,macos,visionos', 'Lint against specific platforms (defaults to all platforms supported by the ' \
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is an example? maybe its missing tvos, watchos, but not for this PR.

@dnkoutso dnkoutso merged commit 85fb443 into CocoaPods:master Nov 28, 2023
6 checks passed
@dnkoutso dnkoutso added this to the 1.15.0 milestone Nov 28, 2023
@NachoSoto
Copy link

Looks like this is still failing though:

[!] Unrecognized platform visionOS. Valid platforms: iOS, macOS, watchOS, visionOS, tvOS

@persidskiy
Copy link

persidskiy commented Jan 17, 2024

Hi, are there any plans to release v10.15 with this fix?

//cc @amorde

@LuisAlvarez12
Copy link

^

@NachoSoto
Copy link

I don't think this is working yet anyway.

@NachoSoto
Copy link

FYI this is still broken on CocoaPods 1.15.0:

[!] Unrecognized platform visionOS. Valid platforms: iOS, macOS, watchOS, visionOS, tvOS

@amorde
Copy link
Member

amorde commented Jan 30, 2024

I did release this in 1.15.0 but I had missed that it wasn't quite working properly. I likely won't have time available to dig into this until the weekend but happy to review PRs if anyone would like to take a shot at addressing the remaining issues

@NachoSoto
Copy link

Turns out that using visionos instead of visionOS works. That error message is bad, but I think @joshdholtz found a way to improve that.

@amorde
Copy link
Member

amorde commented Jan 30, 2024

Ah ok great. Thanks for digging in to that 🙏

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

Successfully merging this pull request may close these issues.

None yet

8 participants