Skip to content
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

Unable to access environment variables in Info.plist on first go #449

Open
mohsinulhaq opened this issue Apr 24, 2020 · 3 comments
Open

Comments

@mohsinulhaq
Copy link

mohsinulhaq commented Apr 24, 2020

I am using RNConfig to set bundle id from env.
When I first run the app, I get the following error:

Required Info.plist Value Not Found A CFBundleIdentifier value in your Info.plist is required. Please confirm this value is present in /Users/xxx/Library/Developer/Xcode/DerivedData/xxx-ezsuhwnwawmjstbafzmcrqcxqpaw/Build/Products/Debug-iphonesimulator/xxx.app/Info.plist

To get it working, I need to reopen Xcode and try again.

The error above is the same one when I manually delete ios/tmp.xcconfig file, and try to run the app. So it seems there is an issue with the build system trying to access the env vars before the RNConfig magic is done.

Any solution to this?

@ayush-shta
Copy link

Seeing this issue after I clean my node modules folder and doing a clean build. It works normally after the first attempt.

RN: 0.62.2, RNC: 1.0.0

@rafaelmaeuer
Copy link
Contributor

Check out #391 (comment)

@idanlevi1
Copy link

Check again where you put the prescript
"${SRCROOT}/../node_modules/react-native-config/ios/ReactNativeConfig/BuildXCConfig.rb" "${SRCROOT}/.." "${SRCROOT}/tmp.xcconfig"

I put it in Run - pre-actions instead Build pre-actions by mistake...

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

4 participants