diff --git a/packages/react-native/ReactCommon/react/cxxstableapi/React-cxxstableapi.podspec b/packages/react-native/ReactCommon/react/cxxstableapi/React-cxxstableapi.podspec index 15524928650..d8d780e7483 100644 --- a/packages/react-native/ReactCommon/react/cxxstableapi/React-cxxstableapi.podspec +++ b/packages/react-native/ReactCommon/react/cxxstableapi/React-cxxstableapi.podspec @@ -25,7 +25,7 @@ Pod::Spec.new do |s| s.author = "Meta Platforms, Inc. and its affiliates" s.platforms = min_supported_versions s.source = source - s.source_files = podspec_sources("*.h", "*.h") + s.source_files = podspec_sources("*.{cpp,h}", "*.h") s.header_dir = "react/cxxstableapi" s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(), "DEFINES_MODULE" => "YES" } diff --git a/packages/react-native/ReactCommon/react/cxxstableapi/StableApiAnchor.cpp b/packages/react-native/ReactCommon/react/cxxstableapi/StableApiAnchor.cpp new file mode 100644 index 00000000000..5d0e7a4459c --- /dev/null +++ b/packages/react-native/ReactCommon/react/cxxstableapi/StableApiAnchor.cpp @@ -0,0 +1,18 @@ +/* + * 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. + */ + +// Anchor translation unit for the `react/cxxstableapi` pod. +// +// The guards in this module are pure preprocessor headers, so the pod would +// otherwise ship no compilable source. CocoaPods emits a PBXAggregateTarget for +// a pod with no compilable sources, and an aggregate target produces no +// `.framework` under `use_frameworks!` — dependents are then unable to resolve +// the guard headers. Giving the pod a single source file forces CocoaPods to +// emit a real framework target instead. +// +// This file intentionally declares nothing: `react/cxxstableapi` has no runtime +// API, only preprocessor guards. Do not add code here. diff --git a/private/react-native-fantom/tester/CMakeLists.txt b/private/react-native-fantom/tester/CMakeLists.txt index 590cd8261b9..541888f03d7 100644 --- a/private/react-native-fantom/tester/CMakeLists.txt +++ b/private/react-native-fantom/tester/CMakeLists.txt @@ -58,6 +58,7 @@ add_react_common_subdir(jsitooling) add_react_common_subdir(logger) add_react_common_subdir(oscompat) add_react_common_subdir(react/bridging) +add_react_common_subdir(react/cxxstableapi) add_react_common_subdir(react/debug) add_react_common_subdir(react/featureflags) add_react_common_subdir(react/nativemodule/core)