react-native-exit-app: 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
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 4
- Comments: 26
Commits related to this issue
- Fix `#import` https://github.com/wumke/react-native-exit-app/issues/71#issuecomment-2497071024 — committed to samsonong/react-native-exit-app by samsonong 2 years ago
@VimukthiShohan
You can run that patch.
from: import <React-Codegen/RNExitAppSpec/RNExitAppSpec.h>
to: import <ReactCodegen/RNExitAppSpec/RNExitAppSpec.h>
Facing the same issue on RN new architecture
going from .75 to .78 … patch does not help, still getting “file not found” on
#import <ReactCodegen/RNExitAppSpec/RNExitAppSpec.h>Incase you need to patch
RNExitApp.mas well: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?
Am on
React-Native 0.76.5and this patch works@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 `
For RN 0.79.1 i generated a patch
open RNExitApp.h and add replace import under RCT_NEW_ARCH_ENABLED with
open RNExitApp.mm and replace the import under #if RCT_NEW_ARCH_ENABLED with
then run
npx patch-package react-native-exit-appyarn install again or npm install then go to ios folder and run pod install againHello 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 foundon this line#import <ReactCodegen/RNExitAppSpec/RNExitAppSpec.h>.Not working in 0.79.1 with patch. Is anyone maintaining this lib?
@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 foundAnd I have replace manually pod file import. After doing that it gives following error.
5 duplicate symbolsSolution from above error ⬇️
✅ Solution In React Native 0.76+, the New Architecture is enabled by default.
ENV[‘RCT_NEW_ARCH_ENABLED’] = ‘0’
cd ios && pod install --repo-update
I hope this works, thanks.
Well for some reason it never worked for me without patching .m file. Xcode complained about not able to find this package.