diff --git a/packages/react-native/React/React-RCTFabric.podspec b/packages/react-native/React/React-RCTFabric.podspec index 70f458f5271..7863a0decb8 100644 --- a/packages/react-native/React/React-RCTFabric.podspec +++ b/packages/react-native/React/React-RCTFabric.podspec @@ -98,6 +98,7 @@ Pod::Spec.new do |s| add_dependency(s, "React-RCTAnimation", :framework_name => 'RCTAnimation') add_dependency(s, "React-jsinspector", :framework_name => 'jsinspector_modern') add_dependency(s, "React-jsinspectortracing", :framework_name => 'jsinspector_moderntracing') + add_dependency(s, "React-renderercss") depend_on_js_engine(s) diff --git a/packages/react-native/ReactCommon/react/renderer/css/CSSDummy.cpp b/packages/react-native/ReactCommon/react/renderer/css/CSSDummy.cpp new file mode 100644 index 00000000000..0ca88ca8091 --- /dev/null +++ b/packages/react-native/ReactCommon/react/renderer/css/CSSDummy.cpp @@ -0,0 +1,14 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +// This file is required for the CSS podpsec because this is a header-files only +// module. Headers file only modules are not supported by Cocoapods when +// building in dynamic framework mode. In that case, the dynamicFramework is not +// generated because there is no binary to generate. This means that other +// frameworks that depends on this will not find the headers they need. Adding a +// simple empty dummy source file forces Cocoapods to generate the frameworks +// and fixes the issue.