So I have my Xcode pre-actions like this:
# Script 1
rm "${CONFIGURATION_BUILD_DIR}/${INFOPLIST_PATH}"
echo ".env.development" > /tmp/envfile
# Script 2
"${SRCROOT}/../node_modules/react-native-config/ios/ReactNativeConfig/BuildXCConfig.rb" "${SRCROOT}/.." "${SRCROOT}/tmp.xcconfig"
for it to copy from my .env.development
file to my tmp.xconfig
My env development files is as following:
REACT_NATIVE_APP_ENVIRONMENT="development"
REACT_NATIVE_APP_SERVER_URL="https://whatever.net"
REACT_NATIVE_WEBSITE_URL="https://whatever.com"
REACT_NATIVE_APP_VERSION_NUMBER="version number"
REACT_NATIVE_APP_POSTHOG_API_KEY="this_is_a_key"
But when it copies to tmp.xconfig
it appears like this:
REACT_NATIVE_APP_ENVIRONMENT="development"
REACT_NATIVE_APP_SERVER_URL=https:/$()/whatever.net
REACT_NATIVE_WEBSITE_URL=https:/$()/whatever.com
REACT_NATIVE_APP_VERSION_NUMBER="version number"
REACT_NATIVE_APP_POSTHOG_API_KEY="this_is_a_key"
so basically its adding some $()
between the //
at the beginning of the urls and this is unintended.
I am not sure of the cause but I would think it started happening after the update to react native 0.74.x