Skip to content

Commit

Permalink
fix: override podspecs dependencies c++ version (facebook#46888)
Browse files Browse the repository at this point in the history
Summary:
Some dependencies would override C++ version like [this](https://github.com/mrousavy/react-native-vision-camera/blob/83abb0832a22b6b080f8412ed17b0992532b0eb2/VisionCamera.podspec#L36).

We force it back to be the current version set by react-native so that we are sure projects are using the correct version

## Changelog:

[IOS] [FIXED] - Enforce we use the correct C++ version for all, even if dependency tries to set it

Pull Request resolved: facebook#46888

Test Plan:
This can be test via
https://github.com/Titozzz/cpp17bug

Reviewed By: blakef

Differential Revision: D64042099

Pulled By: cipolleschi

fbshipit-source-id: c36dda0a718e52e19d53c3e9d895315141cb040c
  • Loading branch information
Titozzz authored and facebook-github-bot committed Oct 8, 2024
1 parent 7c0258a commit d7a8aae
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/react-native/scripts/cocoapods/new_architecture.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ def self.set_clang_cxx_language_standard_if_needed(installer)
config.build_settings[cxxBuildsettingsName] = Helpers::Constants::cxx_language_standard
end
end

# Override targets that would set spec.xcconfig to define c++ version
installer.aggregate_targets.each do |aggregate_target|
aggregate_target.xcconfigs.each do |config_name, config_file|
config_file.attributes[cxxBuildsettingsName] = Helpers::Constants::cxx_language_standard
end
end
end

def self.computeFlags(is_new_arch_enabled)
Expand Down

0 comments on commit d7a8aae

Please sign in to comment.