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

[iOS] Fix Fabric issue with React-Core pod when Xcode project has multiple targets #37581

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions packages/react-native/scripts/cocoapods/new_architecture.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ def self.set_clang_cxx_language_standard_if_needed(installer)
language_standard = nil

installer.pods_project.targets.each do |target|
if target.name == 'React-Core'
# The React-Core pod may have a suffix added by Cocoapods, so we test whether 'React-Core' is a substring, and do not require exact match
if target.name.include? 'React-Core'
language_standard = target.resolved_build_setting("CLANG_CXX_LANGUAGE_STANDARD", resolve_against_xcconfig: true).values[0]
end
end
Expand Down Expand Up @@ -61,7 +62,8 @@ def self.modify_flags_for_new_architecture(installer, is_new_arch_enabled)

# Add RCT_NEW_ARCH_ENABLED to generated pod target projects
installer.target_installation_results.pod_target_installation_results.each do |pod_name, target_installation_result|
if pod_name == 'React-Core'
# The React-Core pod may have a suffix added by Cocoapods, so we test whether 'React-Core' is a substring, and do not require exact match
if pod_name.include? 'React-Core'
target_installation_result.native_target.build_configurations.each do |config|
config.build_settings['OTHER_CPLUSPLUSFLAGS'] = @@new_arch_cpp_flags
end
Expand Down