Skip to content

Fix importing RNExitAppSpec.h in react-native v0.78 #82

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Tokiarivelo opened this issue May 26, 2025 · 0 comments
Open

Fix importing RNExitAppSpec.h in react-native v0.78 #82

Tokiarivelo opened this issue May 26, 2025 · 0 comments

Comments

@Tokiarivelo
Copy link

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-exit-app/ios/RNExitApp/RNExitApp.h b/node_modules/react-native-exit-app/ios/RNExitApp/RNExitApp.h
index 50a2135..6b723a6 100644
--- a/node_modules/react-native-exit-app/ios/RNExitApp/RNExitApp.h
+++ b/node_modules/react-native-exit-app/ios/RNExitApp/RNExitApp.h
@@ -1,13 +1,13 @@
 #if __has_include(<React/RCTBridgeModule.h>)
 #import <React/RCTBridgeModule.h>
-#elif __has_include("RCTBridgeModule.h")
-#import "RCTBridgeModule.h"
+#elif __has_include(<React/RCTBridgeModule.h>)
+#import <React/RCTBridgeModule.h>
 #else
-#import "React/RCTBridgeModule.h"
+#import <React/RCTBridgeModule.h>
 #endif
 
 #if RCT_NEW_ARCH_ENABLED
-#import <React-Codegen/RNExitAppSpec/RNExitAppSpec.h>
+#import "RNExitAppSpec.h"
 #endif
 
 @interface RNExitApp : NSObject <RCTBridgeModule>
diff --git a/node_modules/react-native-exit-app/ios/RNExitApp/RNExitApp.mm b/node_modules/react-native-exit-app/ios/RNExitApp/RNExitApp.mm
index bec5948..b285c5b 100644
--- a/node_modules/react-native-exit-app/ios/RNExitApp/RNExitApp.mm
+++ b/node_modules/react-native-exit-app/ios/RNExitApp/RNExitApp.mm
@@ -3,7 +3,7 @@
 #import "RNExitApp.h"
 
 #if RCT_NEW_ARCH_ENABLED
-#import <RNExitAppSpec/RNExitAppSpec.h>
+#import <RNExitApp/RNExitApp.h>
 #endif
 
 @implementation RNExitApp

This issue body was partially generated by patch-package.

@Tokiarivelo Tokiarivelo changed the title Fix importing RNExitAppSpec.h Fix importing RNExitAppSpec.h in react-native v0.78 May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant