Skip to content

Add visionos as a new platform#11965

Merged
dnkoutso merged 5 commits into
CocoaPods:masterfrom
gabrieldonadel:visionOS
Jun 29, 2023
Merged

Add visionos as a new platform#11965
dnkoutso merged 5 commits into
CocoaPods:masterfrom
gabrieldonadel:visionOS

Conversation

@gabrieldonadel

@gabrieldonadel gabrieldonadel commented Jun 26, 2023

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

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

@dnkoutso

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor

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

List is with bundle exec rake spec --tasks

@dnkoutso

Copy link
Copy Markdown
Contributor

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

@gabrieldonadel

Copy link
Copy Markdown
Contributor Author

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

image

@dnkoutso

dnkoutso commented Jun 29, 2023

Copy link
Copy Markdown
Contributor

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

@dnkoutso dnkoutso merged commit 7234edf into CocoaPods:master Jun 29, 2023
@dnkoutso

dnkoutso commented Jun 29, 2023

Copy link
Copy Markdown
Contributor

@gabrieldonadel congratulations and thank you so much!

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

Copy link
Copy Markdown

Hi, How could use 1.13 to us visionOS platform?

@NachoSoto

Copy link
Copy Markdown

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

paulb777 commented Oct 2, 2023

Copy link
Copy Markdown
Member

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

@NachoSoto

NachoSoto commented Oct 3, 2023

Copy link
Copy Markdown

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

dnkoutso commented Oct 9, 2023

Copy link
Copy Markdown
Contributor

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

dnkoutso commented Oct 9, 2023

Copy link
Copy Markdown
Contributor

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

@dnkoutso

dnkoutso commented Oct 9, 2023

Copy link
Copy Markdown
Contributor

The problem is that it's expecting xros:

yeah you are right @NachoSoto

@NachoSoto

Copy link
Copy Markdown

@dnkoutso any update on this?

@denandreychuk

Copy link
Copy Markdown

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

@triplef

triplef commented Nov 13, 2023

Copy link
Copy Markdown

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
Copy Markdown

FYI this is still broken on CocoaPods 1.15.0:

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

@denandreychuk

denandreychuk commented Jan 29, 2024

Copy link
Copy Markdown

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

@NachoSoto

Copy link
Copy Markdown

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

amorde commented Feb 4, 2024

Copy link
Copy Markdown
Member

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