diff --git a/packages/react-native/React/CxxBridge/NSDataBigString.h b/packages/react-native/React/CxxBridge/NSDataBigString.h index b8c571f8182607..3e5bb42539d463 100644 --- a/packages/react-native/React/CxxBridge/NSDataBigString.h +++ b/packages/react-native/React/CxxBridge/NSDataBigString.h @@ -5,6 +5,7 @@ * LICENSE file in the root directory of this source tree. */ +#ifdef __cplusplus #import #include @@ -38,3 +39,4 @@ class NSDataBigString : public JSBigString { }; } // namespace facebook::react +#endif diff --git a/packages/react-native/React/CxxBridge/RCTCxxBridgeDelegate.h b/packages/react-native/React/CxxBridge/RCTCxxBridgeDelegate.h index e2d48db4548d57..caa0448b1c38f9 100644 --- a/packages/react-native/React/CxxBridge/RCTCxxBridgeDelegate.h +++ b/packages/react-native/React/CxxBridge/RCTCxxBridgeDelegate.h @@ -5,6 +5,7 @@ * LICENSE file in the root directory of this source tree. */ +#ifdef __cplusplus #include #import @@ -29,3 +30,4 @@ class JSExecutorFactory; - (std::unique_ptr)jsExecutorFactoryForBridge:(RCTBridge *)bridge; @end +#endif diff --git a/packages/react-native/React/CxxBridge/RCTJSIExecutorRuntimeInstaller.h b/packages/react-native/React/CxxBridge/RCTJSIExecutorRuntimeInstaller.h index a258102a21fff0..e96f0e5abb10e9 100644 --- a/packages/react-native/React/CxxBridge/RCTJSIExecutorRuntimeInstaller.h +++ b/packages/react-native/React/CxxBridge/RCTJSIExecutorRuntimeInstaller.h @@ -7,6 +7,7 @@ #pragma once +#ifdef __cplusplus #include namespace facebook::react { @@ -19,3 +20,4 @@ JSIExecutor::RuntimeInstaller RCTJSIExecutorRuntimeInstaller( JSIExecutor::RuntimeInstaller runtimeInstallerToWrap); } // namespace facebook::react +#endif diff --git a/packages/react-native/React/CxxBridge/RCTMessageThread.h b/packages/react-native/React/CxxBridge/RCTMessageThread.h index 1232a9e6bc2b39..0ad24de71e5aa3 100644 --- a/packages/react-native/React/CxxBridge/RCTMessageThread.h +++ b/packages/react-native/React/CxxBridge/RCTMessageThread.h @@ -5,6 +5,7 @@ * LICENSE file in the root directory of this source tree. */ +#ifdef __cplusplus #import #import @@ -37,3 +38,4 @@ class RCTMessageThread : public MessageQueueThread, }; } // namespace facebook::react +#endif diff --git a/packages/react-native/React/CxxBridge/RCTObjcExecutor.h b/packages/react-native/React/CxxBridge/RCTObjcExecutor.h index 87ad0858f505d0..5ed918cc464e19 100644 --- a/packages/react-native/React/CxxBridge/RCTObjcExecutor.h +++ b/packages/react-native/React/CxxBridge/RCTObjcExecutor.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ - +#ifdef __cplusplus #include #include @@ -29,3 +29,4 @@ class RCTObjcExecutorFactory : public JSExecutorFactory { }; } // namespace facebook::react +#endif diff --git a/packages/react-native/React/CxxModule/DispatchMessageQueueThread.h b/packages/react-native/React/CxxModule/DispatchMessageQueueThread.h index a8b755bd52c54e..78c262db6bd0b7 100644 --- a/packages/react-native/React/CxxModule/DispatchMessageQueueThread.h +++ b/packages/react-native/React/CxxModule/DispatchMessageQueueThread.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ - +#ifdef __cplusplus #include #include @@ -43,3 +43,4 @@ class DispatchMessageQueueThread : public MessageQueueThread { }; } // namespace facebook::react +#endif diff --git a/packages/react-native/React/CxxModule/RCTCxxMethod.h b/packages/react-native/React/CxxModule/RCTCxxMethod.h index f126032dca4804..c2c7d47e3d8377 100644 --- a/packages/react-native/React/CxxModule/RCTCxxMethod.h +++ b/packages/react-native/React/CxxModule/RCTCxxMethod.h @@ -4,7 +4,7 @@ * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ - +#ifdef __cplusplus #import #import @@ -15,3 +15,4 @@ - (instancetype)initWithCxxMethod:(const facebook::xplat::module::CxxModule::Method &)cxxMethod; @end +#endif diff --git a/packages/react-native/React/CxxModule/RCTCxxModule.h b/packages/react-native/React/CxxModule/RCTCxxModule.h index 093aafee890bfe..b33f397576c936 100644 --- a/packages/react-native/React/CxxModule/RCTCxxModule.h +++ b/packages/react-native/React/CxxModule/RCTCxxModule.h @@ -5,6 +5,7 @@ * LICENSE file in the root directory of this source tree. */ +#ifdef __cplusplus #import #import @@ -27,3 +28,4 @@ class CxxModule; - (std::unique_ptr)createModule; @end +#endif diff --git a/packages/react-native/React/CxxModule/RCTCxxUtils.h b/packages/react-native/React/CxxModule/RCTCxxUtils.h index b4411088e19f5c..93d97cff8157bd 100644 --- a/packages/react-native/React/CxxModule/RCTCxxUtils.h +++ b/packages/react-native/React/CxxModule/RCTCxxUtils.h @@ -5,6 +5,7 @@ * LICENSE file in the root directory of this source tree. */ +#ifdef __cplusplus #include #include @@ -25,3 +26,4 @@ NSError *tryAndReturnError(const std::function &func); NSString *deriveSourceURL(NSURL *url); } // namespace facebook::react +#endif diff --git a/packages/react-native/React/CxxModule/RCTNativeModule.h b/packages/react-native/React/CxxModule/RCTNativeModule.h index 730839a9b52e08..50ff4765e9ca51 100644 --- a/packages/react-native/React/CxxModule/RCTNativeModule.h +++ b/packages/react-native/React/CxxModule/RCTNativeModule.h @@ -5,6 +5,7 @@ * LICENSE file in the root directory of this source tree. */ +#ifdef __cplusplus #import #import @@ -30,3 +31,4 @@ class RCTNativeModule : public NativeModule { }; } // namespace facebook::react +#endif diff --git a/packages/react-native/React/CxxUtils/RCTFollyConvert.h b/packages/react-native/React/CxxUtils/RCTFollyConvert.h index 7da61aa9bd55a6..5c9e5b3f90dbef 100644 --- a/packages/react-native/React/CxxUtils/RCTFollyConvert.h +++ b/packages/react-native/React/CxxUtils/RCTFollyConvert.h @@ -5,6 +5,7 @@ * LICENSE file in the root directory of this source tree. */ +#ifdef __cplusplus #import #include @@ -15,3 +16,5 @@ folly::dynamic convertIdToFollyDynamic(id json); id convertFollyDynamicToId(const folly::dynamic &dyn); } // namespace facebook::react + +#endif diff --git a/packages/react-native/scripts/cocoapods/fabric.rb b/packages/react-native/scripts/cocoapods/fabric.rb index 3e186dc6c428d5..9f93cc22857e0e 100644 --- a/packages/react-native/scripts/cocoapods/fabric.rb +++ b/packages/react-native/scripts/cocoapods/fabric.rb @@ -12,6 +12,6 @@ def setup_fabric!(react_native_path: "../node_modules/react-native", new_arch_en pod 'React-graphics', :path => "#{react_native_path}/ReactCommon/react/renderer/graphics" pod 'React-RCTFabric', :path => "#{react_native_path}/React", :modular_headers => true pod 'React-ImageManager', :path => "#{react_native_path}/ReactCommon/react/renderer/imagemanager/platform/ios" - pod 'RCT-Folly/Fabric', :podspec => "#{react_native_path}/third-party-podspecs/RCT-Folly.podspec" + pod 'RCT-Folly/Fabric', :podspec => "#{react_native_path}/third-party-podspecs/RCT-Folly.podspec", :modular_headers => true pod 'React-FabricImage', :path => "#{react_native_path}/ReactCommon" end