iOS build problem
Hello,
I am facing a problem with iOS build.
Currenlty I am using RN 0.73.2 and I need to build the app with static framework, so I am not 100% sure what the problem could be (if the newest Rn release or the static framework) anyway I got this error in RNExitApp.h
'React-Codegen/RNExitAppSpec/RNExitAppSpec.h' file not found` at line 10
#import <React-Codegen/RNExitAppSpec/RNExitAppSpec.h>
The error disappear (and I am able to build my app) if I change the line to #import <RNExitAppSpec/RNExitAppSpec.h> so probably it is just necessary to update the code.
I can open PR if you want.
Thanks
~~I had the same, forcefully updated to 2.0.0. Reinstalled the pods. And it magically started working (rn 0.75.3).~~
EDIT: Nope, back at it
#if RCT_NEW_ARCH_ENABLED
#import <React-Codegen/RNExitAppSpec/RNExitAppSpec.h>
'React-Codegen/RNExitAppSpec/RNExitAppSpec.h' file not found
EDIT 2:
cd ios && pod install will install it,
it seems it is not installed when RCT_NEW_ARCH_ENABLED=1 pod install
Facing the same issue on RN new architecture
same here
same issue
Same here
@indrajit-roy-sc @Degan90 @dkahdwk Any solution???
@VimukthiShohan
--- 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 <ReactCodegen/RNExitAppSpec/RNExitAppSpec.h>
#endif
@interface RNExitApp : NSObject <RCTBridgeModule>
You can run that patch.
from: import <React-Codegen/RNExitAppSpec/RNExitAppSpec.h>
to: import <ReactCodegen/RNExitAppSpec/RNExitAppSpec.h>
@dkahdwk Thanks for the help. Ran in to some errors and fixed by this flow. I will keep it if someone get this issue.
Patch is applied.
'RNExitAppSpec/RNExitAppSpec.h' file not found
And I have replace manually pod file import. After doing that it gives following error.
5 duplicate symbols
Solution from above error ⬇️
I found this on Apple forum. I hope this would be helpful for anyone who still facing the issue. Fixed: Add "-ld64" under Build Setting -> Other Linker Flags
https://forums.developer.apple.com/forums/thread/736590 https://developer.apple.com/forums/thread/731090
+1
+1
+1
@VimukthiShohan
--- 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 <ReactCodegen/RNExitAppSpec/RNExitAppSpec.h> #endif @interface RNExitApp : NSObject <RCTBridgeModule>You can run that patch.
from: import <React-Codegen/RNExitAppSpec/RNExitAppSpec.h>
to: import <ReactCodegen/RNExitAppSpec/RNExitAppSpec.h>
Am on React-Native 0.76.5 and this patch works
Incase you need to patch RNExitApp.m as well:
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..4a598a3 100644
--- a/node_modules/react-native-exit-app/ios/RNExitApp/RNExitApp.h
+++ b/node_modules/react-native-exit-app/ios/RNExitApp/RNExitApp.h
@@ -7,7 +7,7 @@
#endif
#if RCT_NEW_ARCH_ENABLED
-#import <React-Codegen/RNExitAppSpec/RNExitAppSpec.h>
+#import <ReactCodegen/RNExitAppSpec/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..f2a8743 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 <ReactCodegen/RNExitAppSpec/RNExitAppSpec.h>
#endif
@implementation RNExitApp
Incase you need to patch
RNExitApp.mas well: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..4a598a3 100644 --- a/node_modules/react-native-exit-app/ios/RNExitApp/RNExitApp.h +++ b/node_modules/react-native-exit-app/ios/RNExitApp/RNExitApp.h @@ -7,7 +7,7 @@ #endif
#if RCT_NEW_ARCH_ENABLED -#import <React-Codegen/RNExitAppSpec/RNExitAppSpec.h> +#import <ReactCodegen/RNExitAppSpec/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..f2a8743 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 <ReactCodegen/RNExitAppSpec/RNExitAppSpec.h> #endif
@implementation RNExitApp
Mmm is the changes to RNExitApp.mm required for the fix? I recognize and tested the RNExitApp.h part without the RNExitApp.mm
Incase you need to patch
RNExitApp.mas well: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..4a598a3 100644 --- a/node_modules/react-native-exit-app/ios/RNExitApp/RNExitApp.h +++ b/node_modules/react-native-exit-app/ios/RNExitApp/RNExitApp.h @@ -7,7 +7,7 @@ #endif
#if RCT_NEW_ARCH_ENABLED -#import <React-Codegen/RNExitAppSpec/RNExitAppSpec.h> +#import <ReactCodegen/RNExitAppSpec/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..f2a8743 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 <ReactCodegen/RNExitAppSpec/RNExitAppSpec.h> #endif
@implementation RNExitApp
Mmm is the changes to
RNExitApp.mmrequired for the fix? I recognize and tested theRNExitApp.hpart without theRNExitApp.mm
Well for some reason it never worked for me without patching .m file. Xcode complained about not able to find this package.
Incase you need to patch
RNExitApp.mas well: 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..4a598a3 100644 --- a/node_modules/react-native-exit-app/ios/RNExitApp/RNExitApp.h +++ b/node_modules/react-native-exit-app/ios/RNExitApp/RNExitApp.h @@ -7,7 +7,7 @@ #endif #if RCT_NEW_ARCH_ENABLED -#import <React-Codegen/RNExitAppSpec/RNExitAppSpec.h> +#import <ReactCodegen/RNExitAppSpec/RNExitAppSpec.h> #endif @interface RNExitApp : NSObject 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..f2a8743 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 <ReactCodegen/RNExitAppSpec/RNExitAppSpec.h> #endif @implementation RNExitAppMmm is the changes to
RNExitApp.mmrequired for the fix? I recognize and tested theRNExitApp.hpart without theRNExitApp.mmWell for some reason it never worked for me without patching .m file. Xcode complained about not able to find this package.
Do you think we should slide that into #76 too?
does it work for you guys on android ? i'm getting cannot find symbol NativeRNExitAppSpec
going from .75 to .78 ... patch does not help, still getting "file not found" on #import <ReactCodegen/RNExitAppSpec/RNExitAppSpec.h>
Not working in 0.79.1 with patch. Is anyone maintaining this lib?
Hello everyone,
I have also been facing this error. If anyone could provide more information.
react-native version: ^0.79.1 react-native-exit-app: 2.0.0.
The error that I have been receiving 'ReactCodegen/RNExitAppSpec/RNExitAppSpec.h' file not found on this line #import <ReactCodegen/RNExitAppSpec/RNExitAppSpec.h>.
Same issue here with:
react-native version: ^0.79.1 react-native-exit-app: 2.0.0
the patch is not working in this version :( any solutions?
Same issue here with:
react-native: 0.79.0 react-native-exit-app: 2.0.0
the patch is not working in this version, any solution?
For RN 0.79.1 i generated a patch
open RNExitApp.h and add replace import under RCT_NEW_ARCH_ENABLED with
#if RCT_NEW_ARCH_ENABLED
#import <ReactCodegen/RNExitAppSpec/RNExitAppSpec.h>
#endif
open RNExitApp.mm and replace the import under #if RCT_NEW_ARCH_ENABLED with
#if RCT_NEW_ARCH_ENABLED
#import <RNExitApp/RNExitApp.h>
#endif
then run npx patch-package react-native-exit-app
yarn install again or npm install
then go to ios folder and run pod install again
For RN 0.77.2
Any patch on the above is not working. The following error still happened:
node_modules/react-native-exit-app/ios/RNExitApp/RNExitApp.h:10:9:
'ReactCodegen/RNExitAppSpec/RNExitAppSpec.h' file not found
Same issue here with:
react-native: 0.79.0 react-native-exit-app: 2.0.0
the patch is not working in this version, any solution?
with react-native 0.78.2, I've changed #import <ReactCodegen/RNExitAppSpec/RNExitAppSpec.h> by #import "RNExitAppSpec.h" and it's running
For RN 0.77.2
Any patch on the above is not working. The following error still happened:
node_modules/react-native-exit-app/ios/RNExitApp/RNExitApp.h:10:9: 'ReactCodegen/RNExitAppSpec/RNExitAppSpec.h' file not found
@peteAhn I'm on 0.77.2 as well, the patch below works for me
`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..572fa91 100644 --- a/node_modules/react-native-exit-app/ios/RNExitApp/RNExitApp.h +++ b/node_modules/react-native-exit-app/ios/RNExitApp/RNExitApp.h @@ -7,7 +7,7 @@ #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..020c05a 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 "RNExitAppSpec.h" #endif
@implementation RNExitApp `
✅ Solution In React Native 0.76+, the New Architecture is enabled by default.
- Disable New Architecture by adding this at the top of your Podfile:
ENV['RCT_NEW_ARCH_ENABLED'] = '0'
cd ios && pod install --repo-update
I hope this works, thanks.
✅ Solution I am using react native 0.80.1
I have changed RNExitApp.h file with below code #if RCT_NEW_ARCH_ENABLED #import "RNExitAppSpec.h" #endif
and RNExitApp.mm with below code #if RCT_NEW_ARCH_ENABLED #import "RNExitApp/RNExitApp.h" #endif
it's worked for me
+1
✅ Solution I am using react native 0.80.1
I have changed RNExitApp.h file with below code #if RCT_NEW_ARCH_ENABLED #import "RNExitAppSpec.h" #endif
and RNExitApp.mm with below code #if RCT_NEW_ARCH_ENABLED #import "RNExitApp/RNExitApp.h" #endif
it's worked for me
it works for me :-) RN: 0.79.6
@Tokiarivelo With my versions being:
"react-native": "0.82.0", "react-native-exit-app": "^2.0.0",
had the same issue. After your advice it works. Thank you! 🙏
Updates in RNExitApp.mm node_modules/react-native-exit-app/ios/RNExitApp/RNExitApp.mm
OLD:
#if RCT_NEW_ARCH_ENABLED
#import <RNExitAppSpec/RNExitAppSpec.h>
#endif
NEW:
#if RCT_NEW_ARCH_ENABLED
#import "RNExitAppSpec.h"
#endif
Updates in RNExitApp.h node_modules/react-native-exit-app/ios/RNExitApp/RNExitApp.h
OLD:
#if RCT_NEW_ARCH_ENABLED
#import <React-Codegen/RNExitAppSpec/RNExitAppSpec.h>
#endif
NEW:
#if RCT_NEW_ARCH_ENABLED
#import "RNExitAppSpec.h"
#endif