-
Notifications
You must be signed in to change notification settings - Fork 659
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 not updated on cmd-builds (iOS) #710
Comments
Maybe #409, #591, #615 and #698 are related? Solution inspired by How do I force Xcode to rebuild the Info.plist file in my project every time I build the project? |
Use 1.4.4 |
Are there any updates on this? It's still happening 😢 |
Still valid, can't believe it as almost 2 years have passed - using following pre-action script: # react-native-config: remove built file (fix) and generate xcconfig
rm -f ${BUILD_DIR}/GeneratedInfoPlistDotEnv.h
"${SRCROOT}/../node_modules/react-native-config/ios/ReactNativeConfig/BuildXCConfig.rb" "${SRCROOT}/.." "${SRCROOT}/tmp.xcconfig" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Today I was wondering why my .env-vars were not updated on iOS when building the app from cmd.
It works fine when the build is triggered from Xcode directly, so that seemed a little curious to me.
I use
app-version
andbuild-number
from .env to sync iOS and Android-versions. I noticed a mismatch of build-numbers when reading directly fromConfig.APP_BUILD
(not updated) andDeviceInfo.getBuildNumber()
(updated). As DeviceInfo gets the information from info.plist, the updated var was somewhere lost on the way into the JS-code.After some investigation and reading lots of issues here, I came to the point that
GeneratedInfoPlistDotEnv.h
was not updated, when building the app from command-line usingnpx react-native run-ios
. So my current workaround is another preprocess-script that deletes the file before every build. It forces the file to be re-generated and the updated var is available in JS too:If anyone knows a better fix or solution please let me know!
The text was updated successfully, but these errors were encountered: