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

Add visionos as a new platform #11965

Merged
merged 5 commits into from Jun 29, 2023
Merged

Conversation

gabrieldonadel
Copy link
Contributor

@gabrieldonadel gabrieldonadel commented Jun 26, 2023

This PR introduces visionOS as a supported platform. This lays the groundwork for supporting visionOS as a new platform in CocoaPods.

Closes #11961

Related to CocoaPods/Core#745 and CocoaPods/Xcodeproj#913

@gabrieldonadel
Copy link
Contributor Author

Hi @dnkoutso, can you take a look at this PR? Am I missing something that needs to be addressed here?

@dnkoutso
Copy link
Contributor

@gabrieldonadel can you bundle update cocoapods-core xcodeproj in your PR to bump the SHA's with the recently merged PRs?

@dnkoutso dnkoutso added this to the 1.13.0 milestone Jun 28, 2023
@gabrieldonadel
Copy link
Contributor Author

@gabrieldonadel can you bundle update cocoapods-core xcodeproj in your PR to bump the SHA's with the recently merged PRs?

Sure, I've just pushed a commit updating Gemfile.lock

@gabrieldonadel
Copy link
Contributor Author

Seems that we'll need to update LastUpgradeVersion = "1500" inside https://github.com/CocoaPods/cocoapods-integration-specs

@dnkoutso
Copy link
Contributor

@gabrieldonadel from the cocoapods repo on your branch run bundle exec rake spec:integration:update it will modify a bunch of files and then open a PR in the integration specs repo. We will merge that and then bump the SHA here.

Its a process but those integration specs catch some stuff...

@gabrieldonadel
Copy link
Contributor Author

@gabrieldonadel from the cocoapods repo on your branch run bundle exec rake spec:integration:update it will modify a bunch of files and then open a PR in the integration specs repo. We will merge that and then bump the SHA here.

Its a process but those integration specs catch some stuff...

Should I run bundle exec rake spec:integration:update inside the CocoaPods/CocoaPods repo? This gives me an error
image

@dnkoutso
Copy link
Contributor

@gabrieldonadel might be bundle exec rake spec:rebuild_integration_fixtures sorry.

List is with bundle exec rake spec --tasks

@dnkoutso
Copy link
Contributor

And yes inside CocoaPods/CocoaPods repo and be on your branch.

@gabrieldonadel
Copy link
Contributor Author

Ohh I see @dnkoutso, this should be fixed now CocoaPods/cocoapods-integration-specs#343

image

@dnkoutso
Copy link
Contributor

dnkoutso commented Jun 29, 2023

I had one question in CocoaPods/cocoapods-integration-specs#343.

@dnkoutso dnkoutso merged commit 7234edf into CocoaPods:master Jun 29, 2023
6 checks passed
@dnkoutso
Copy link
Contributor

dnkoutso commented Jun 29, 2023

@gabrieldonadel congratulations and thank you so much!

@gabrieldonadel gabrieldonadel deleted the visionOS branch June 29, 2023 21:17
@jerryliurui
Copy link

Hi, How could use 1.13 to us visionOS platform?

@NachoSoto
Copy link

Was this tested before being released?

pod lib lint --platforms=visionos fails:

  • ERROR | [visionOS] unknown: Encountered an unknown error (Could not find a visionos simulator (valid values: ios, tvos, watchos, xros). Ensure that Xcode -> Window -> Devices has at least one visionos simulator listed or otherwise add one.

pod lib lint --platforms=xros fails too:

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

@paulb777
Copy link
Member

paulb777 commented Oct 2, 2023

Do you have a visionos simulator installed in your local Xcode installation?

@NachoSoto
Copy link

NachoSoto commented Oct 3, 2023

Xcode 15 beta 8 on CircleCI has it installed, yes: https://discuss.circleci.com/t/xcode-15-rc-released-important-notice-for-visionos-sdk-users/49278#warning-for-visionos-sdk-users-warning-2

The problem is that it's expecting xros:

Could not find a visionos simulator (valid values: ios, tvos, watchos, xros

But the --platforms parameter doesn't accept that.

@dnkoutso
Copy link
Contributor

dnkoutso commented Oct 9, 2023

Ah we might need to update https://github.com/CocoaPods/fourflusher/blob/master/lib/fourflusher/find.rb#L107-L126

different gem which we could update and cocoapods can start functioning

@dnkoutso
Copy link
Contributor

dnkoutso commented Oct 9, 2023

Hmm maybe something is off between the two of them...

@dnkoutso
Copy link
Contributor

dnkoutso commented Oct 9, 2023

The problem is that it's expecting xros:

yeah you are right @NachoSoto

@NachoSoto
Copy link

@dnkoutso any update on this?

@denandreychuk
Copy link

Experiencing the same problem with pod lib lint. It's expecting xros.

@triplef
Copy link

triplef commented Nov 13, 2023

Would be great if pod lib lint support for visionOS could be fixed. Multiple pods such as Firebase and RevenueCat are currently blocked by this to ship their visionOS support. 🙏

@NachoSoto
Copy link

FYI this is still broken on CocoaPods 1.15.0:

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

@denandreychuk
Copy link

denandreychuk commented Jan 29, 2024

It's sad considering vision pro release in a couple of days

@NachoSoto
Copy link

I've looked through the code in CocoaPods/Core#745 and I don't fully understand why it doesn't work.

The error comes from here:

@platforms = platforms.map do |platform|
  result =  case platform.to_s.downcase
            # Platform doesn't recognize 'macos' as being the same as 'osx' when initializing
            when 'macos' then Platform.macos
            else Platform.new(platform, nil)
            end
  unless valid_platform?(result)
    raise Informative, "Unrecognized platform `#{platform}`. Valid platforms: #{VALID_PLATFORMS.join(', ')}"
  end
  result
end

This is how valid_platform is implemented:

def valid_platform?(platform)
  VALID_PLATFORMS.any? { |p| p.name == platform.name }
end

Which comes from CocoaPods/Core:

def self.all
  [ios, osx, watchos, visionos, tvos]
end

I see there's logic there for lowercasing the name, but as far as I can tell it's correct.

@amorde
Copy link
Member

amorde commented Feb 4, 2024

The lowercasing is only applied to the macos check. Looks like a simple fix - thanks for narrowing it down!

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.

Support for VisionOS
8 participants