-
Notifications
You must be signed in to change notification settings - Fork 658
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
GeneratedInfoPlistDotEnv.h' file not found #83
Comments
Same here |
same here |
+1 edit: had this issue even having run 'react-native link' |
+1 edit: was having this issue until I realised I hadn't run "react-native link" |
+1, Even after linking it did not work |
I had this problem using a previous version of react-native-config. I was able to resolve it by updating to 0.3.0, unlinking react-native-config, cleaning my project, and deleting ios/build. |
Make sure you do the preprocess settings under Build Settings while having the main project selected, not a target. This was causing the error in my case. 😄 |
@coreyar: I try both 0.3.0 and 0.3.1 unlink and relink but still failed. Are you using with multi build configurations instead of default "release and debug"? @cristianrosu : This error throw from preprocessor. |
I find that the BuildDotenvConfig.ruby wrote to wrong file:
But the preprocess script check the link:
|
After all I find the solution for this : Set the value for Info.plist Preprocessor Prefix File Instead of the one from documentation: |
+1 - great fix @deno028 |
Try to double check if there is no space when you copy/paste ${CONFIGURATION_BUILD_DIR}/GeneratedInfoPlistDotEnv.h in the preprocessor prefix file. |
Any solution for this? Tried linking and different preprocessor. |
@Johan-dutoit : What problem have you got? Any error message? |
Upgrade or downgrade library version based on your react native version. I was using RN 0.38 and I was using latest version of react native config. I had to downgrade config version to make it work
…Sent from my iPhone
On 05-Apr-2017, at 10:26 AM, Thanh Lam ***@***.***> wrote:
@Johan-dutoit : What problem have you got? Any error message?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I was getting this error for a new "Staging" scheme I had created. The standard release scheme was working but the Staging scheme was not. @deno028 your suggestion worked for me. |
@deno028 I eventually got it to work with the new config, using your above solution. Guess it was just not cleaned/built correctly after I initially made the change. |
I faced similar issue when I removed the node_modules folder to check something. Linking again using react-native also did not work. So, tried unlinking and linking it again.
After this it works fine for me |
I fix it. |
I also found that |
I had to set it to the ${BUILD_DIR}/GeneratedInfoPlistDotEnv.h Looking at the BuildDotenvConfig.ruby file, it writes the header file to:
So, I ended up changing the Info.plist Preprocessor Prefix File setting to ${BUILD_DIR}/GeneratedInfoPlistDotEnv.h This has to be done for the Project and all targets. In my case, in three places. |
I install the latest version, and i found difference between README.md and web page
on web page: After i change my config as in READEME.md , it works well |
@pedro will one of the above be accepted? There a few different answers here, seems to be different things work for different people. Just to add my bit - for me, I deleted my node_modules folder, re-installed node modules and then installed and linked react-native-config. I then used ${BUILD_DIR}/GeneratedInfoPlistDotEnv.h instead of what is suggested in the readme and it worked for me. |
In my case I couldn't find any. Is there way to better debug the process? |
Changing I looked in the build directory and it seems the path for |
I wasted a couple of hours with this issue as well... using version I fixed by applying this patch to my - ONLY_ACTIVE_ARCH = NO;
+ ONLY_ACTIVE_ARCH = YES;
- INFOPLIST_PREFIX_HEADER = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)/GeneratedInfoPlistDotEnv.h";
+ INFOPLIST_PREFIX_HEADER = "${BUILD_DIR}/GeneratedInfoPlistDotEnv.h"; I really hope this could help somebody else not to waste time! |
@xilibro thanks man, you saved my day! |
Fixed this by opening
to:
|
@mikefrancis, you save my time. 😄 |
@RyanMcDonald 's adding of the library worked for me. I had to do some manual steps:
My error went away yelling about the "GeneratedInfoPlistDotEnv.h" not existing. |
If some one of you is using cocoapods this solution, from @birkir, works perfectly: |
I just did the manual linking and I am getting React/RCTDefines.h' file not found. "react": "^16.0.0-beta.5", |
If someone is facing this issue on a customised configuration(other than |
Whenever you add a new target you either need to add manually or if you use cocoapods, make sure it gets added to the target their in your Podfile |
Setting |
This is giving me linkers error. |
I got this error when I forgot to run npm install inside my react native project before building the app. Steps followed : Went to react native project folder. Ran npm install from the Terminal. Restarted Xcode.Everything started working. |
Adding the following to my Podfile after deleting
|
Didn't work for me. :( |
I've changed the below configs in "Build Settings" of project
and it worked |
If you're coming from React version 0.60 and above, you should be referencing the package from GitHub instead of NPM. The author hasn't released auto-linking support on NPM yet, even though it's already merged!? Try these steps after you unlink and uninstall the existing version of
You don't have to add any other post-install scripts, just run the app like usual and it should work fine. Make sure you undo any other fixes before doing this. |
|
@nicolashemonic do you have the |
I no longer needed the dependency and I removed it and it's pods, however I kept getting the following error:
The fix was simple yet time consuming:
|
@nicolashemonic Perhaps this will help: #391 (comment) |
@denisdimitrov Just followed your suggestion. |
#391 (comment) describes how to generate the file, so it should give the right hint for anyone who needs to remove it. |
Thanks @moroz0v, this worked for me. Setting it ONLY on project and NOT on the targets is the secret here. |
My solution was pretty specific - mine was failing only when testing with Detox, but working fine with normal
To point to the Xcode DerivedData directory, where the .h file can actually be found: /Users/me/Library/Developer/Xcode/DerivedData/mobile2mr-xxxx |
for anyone who couldn't find a solution, how i solved mine was to navigate to the folder that was mentioned in the error message. mine was |
If anyone is still having the problem, my issue was that I was opening Xcode in ios folder, what solved it for my was opening xcworkspace file from Xcode. |
Sorry guys, I've been offline for a while. I think new versions this issue was solved. |
We fixed by removing the requirements for |
I am using Apple M2 chip |
I created a new scheme with new Configuration build : releaseDev
"react-native": "0.37.0",
"react-native-config": "^0.3.0",
When archiving I got this error:
fatal error: '/Users/xxx/Library/Developer/Xcode/DerivedData/MyProject-xxx/Build/Intermediates/ArchiveIntermediates/myDevScheme/BuildProductsPath/ReleaseDev-iphoneos/GeneratedInfoPlistDotEnv.h' file not found
Notes: it works with default configuration builds: release and debug.
The text was updated successfully, but these errors were encountered: