From be895c870c897705e65513574c459e85c38d5f7d Mon Sep 17 00:00:00 2001 From: Riccardo Date: Wed, 14 Dec 2022 02:24:07 -0800 Subject: [PATCH] Properly support both libraries and use_frameworks (#35624) (#35637) Summary: Backporting a [fix](https://github.com/facebook/react-native/commit/c6fa6335971459158efc8bf094822547a4333235) on the `ReactCommon.podspec` to properly support static libraries and static frameworks ## Changelog [IOS][FIXED] - Properly support static libraries and static frameworks Pull Request resolved: https://github.com/facebook/react-native/pull/35637 Test Plan: Tested in 0.71-RC4 Reviewed By: christophpurrer Differential Revision: D42029571 Pulled By: cipolleschi fbshipit-source-id: e562fe211931a0aebba282057589e5dd4fafe3ba --- ReactCommon/ReactCommon.podspec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ReactCommon/ReactCommon.podspec b/ReactCommon/ReactCommon.podspec index ba4947b7a9aded..39701310f6af11 100644 --- a/ReactCommon/ReactCommon.podspec +++ b/ReactCommon/ReactCommon.podspec @@ -61,7 +61,10 @@ Pod::Spec.new do |s| ss.subspec "core" do |sss| sss.source_files = "react/nativemodule/core/ReactCommon/**/*.{cpp,h}", "react/nativemodule/core/platform/ios/**/*.{mm,cpp,h}" - sss.exclude_files = "react/nativemodule/core/ReactCommon/{LongLivedObject,CallbackWrapper}.h" + excluded_files = ENV['USE_FRAMEWORKS'] == nil ? + "react/nativemodule/core/ReactCommon/LongLivedObject.h" : + "react/nativemodule/core/ReactCommon/{LongLivedObject,CallbackWrapper}.h" + sss.exclude_files = excluded_files end ss.subspec "samples" do |sss|