Skip to content

Instantly share code, notes, and snippets.

@Kudo
Created March 14, 2025 09:07
Show Gist options
  • Save Kudo/9b2c53ecb6186594b5f679b1fcfedf86 to your computer and use it in GitHub Desktop.
Save Kudo/9b2c53ecb6186594b5f679b1fcfedf86 to your computer and use it in GitHub Desktop.
expo fix for fcxx-modules
diff --git a/node_modules/expo-modules-core/common/cpp/fabric/ExpoViewComponentDescriptor.h b/node_modules/expo-modules-core/common/cpp/fabric/ExpoViewComponentDescriptor.h
index 11073e5..988b389 100644
--- a/node_modules/expo-modules-core/common/cpp/fabric/ExpoViewComponentDescriptor.h
+++ b/node_modules/expo-modules-core/common/cpp/fabric/ExpoViewComponentDescriptor.h
@@ -2,7 +2,7 @@
#pragma once
-#ifdef __cplusplus
+#if defined(__has_feature) && !__has_feature(objc_modules)
#include <react/renderer/core/ConcreteComponentDescriptor.h>
diff --git a/node_modules/expo-modules-core/common/cpp/fabric/ExpoViewProps.h b/node_modules/expo-modules-core/common/cpp/fabric/ExpoViewProps.h
index eb421be..e17d522 100644
--- a/node_modules/expo-modules-core/common/cpp/fabric/ExpoViewProps.h
+++ b/node_modules/expo-modules-core/common/cpp/fabric/ExpoViewProps.h
@@ -2,7 +2,7 @@
#pragma once
-#ifdef __cplusplus
+#if defined(__has_feature) && !__has_feature(objc_modules)
#include <folly/dynamic.h>
#include <react/renderer/components/view/ViewProps.h>
diff --git a/node_modules/expo-modules-core/common/cpp/fabric/ExpoViewShadowNode.h b/node_modules/expo-modules-core/common/cpp/fabric/ExpoViewShadowNode.h
index 55f50ec..1d4960d 100644
--- a/node_modules/expo-modules-core/common/cpp/fabric/ExpoViewShadowNode.h
+++ b/node_modules/expo-modules-core/common/cpp/fabric/ExpoViewShadowNode.h
@@ -2,7 +2,7 @@
#pragma once
-#ifdef __cplusplus
+#if defined(__has_feature) && !__has_feature(objc_modules)
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
diff --git a/node_modules/react-native/Libraries/AppDelegate/RCTAppSetupUtils.h b/node_modules/react-native/Libraries/AppDelegate/RCTAppSetupUtils.h
index 8c57761..b95efb2 100644
--- a/node_modules/react-native/Libraries/AppDelegate/RCTAppSetupUtils.h
+++ b/node_modules/react-native/Libraries/AppDelegate/RCTAppSetupUtils.h
@@ -9,7 +9,7 @@
#import <React/RCTBridge.h>
#import <React/RCTRootView.h>
-#ifdef __cplusplus
+#if defined(__has_feature) && !__has_feature(objc_modules)
#import <memory>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment