From 2bfb53c2fba366d3476892f2384265aac212fbeb Mon Sep 17 00:00:00 2001 From: Joshua Kaplan Date: Wed, 25 Jan 2023 02:17:07 -0800 Subject: [PATCH] Use modern Podfile syntax to avoid polluting application build settings (#35954) Summary: Fixes conflicts in pod build settings like the one below: Example warning > Can't merge user_target_xcconfig for pod targets: ["RNReanimated", "hermes-engine"]. Singular build setting CLANG_CXX_LANGUAGE_STANDARD has different values. Background: > The former attribute xcconfig is deprecated and will cause a linter error when pushing new versions to trunk. The new attributes are available as pod_target_xcconfig and user_target_xcconfig, which makes their effects more clear. The latter attribute (user_target_xcconfig) should be used with great care, because well designed Pods should be self-contained and make as few assumptions about their environment as possible. Furthermore, this attribute can cause conflicts when different values are specified by two Pods for a build setting which doesn't allow multiple values and so cannot be merged. - https://blog.cocoapods.org/CocoaPods-0.38/ ## Changelog Pull Request resolved: https://github.com/facebook/react-native/pull/35954 Test Plan: - Run in example app ## Related PR - https://github.com/facebook/hermes/pull/903 Reviewed By: christophpurrer Differential Revision: D42737921 Pulled By: jacdebug fbshipit-source-id: 75d087a5287e660a703342d6e0ad6632f05f3c4c --- sdks/hermes-engine/hermes-engine.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdks/hermes-engine/hermes-engine.podspec b/sdks/hermes-engine/hermes-engine.podspec index 00dfcc4d90a6b6..87d0710b4b99a3 100644 --- a/sdks/hermes-engine/hermes-engine.podspec +++ b/sdks/hermes-engine/hermes-engine.podspec @@ -39,7 +39,7 @@ Pod::Spec.new do |spec| spec.preserve_paths = '**/*.*' spec.source_files = '' - spec.xcconfig = { + spec.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++17", "CLANG_CXX_LIBRARY" => "compiler-default" }.merge!(build_type == :debug ? { "GCC_PREPROCESSOR_DEFINITIONS" => "HERMES_ENABLE_DEBUGGER=1" } : {})