[visionOS] Add local podspecs to override supported platforms #2047
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please select one of the following
Summary:
This PR is part of a series of PRs for adding support for visionOS to the repository. See #2019 .
The way cocoapods works, the platforms a pod targets must be specified in its' pod spec, otherwise the generated Xcodeproj target won't output that platform's static library. AKA, if Pod A targets
{:iOS => 13.4, :osx => 10.15}
, then targets that outputlibA-iOS.a
andlibA-macOS.a
will be generated, but not targets that outputlibA-visionOS.a
. For most pod dependencies of react native, we set the platforms usingmin_supported_versions
helper method, which we can override to return as many platforms as we want. However, there are a few pods where we don't control the podspec because we're getting it from the cocoapods registry. Without updating the pod in its own repo, we wouldn't be able to override the platforms, even if we're perfectly able to compile for said platform. In our case, that would be:main
:0.73
and0.72
:Rather than wait for those repos to update (SocketRocket has been taking a while), we can instead make local podspecs, stick in the folder
third_party_podspecs
, and reference them in our ruby methods. Let's do that.We don't need to add
fmt.podspec
formain
because facebook@bb9ed0e already did so. For the back ports to0.73-stable
and0.72-stable
, I will cherry-pick that change with the caveat it is newer than the version offmt
used on those branches before. I tried to downgrade to 6.2.1... but then it failed to build. This is a library for formatting print statements and iostream, which should be relatively safe to upgrade.Changelog:
[IOS] [CHANGED] - Add local podspecs to override supported platforms
Test Plan:
CI should pass.