maxkomarychev / react-native-ultimate-config

Config that works
MIT License
260 stars 31 forks source link

Warning on build: ios/rnuc.xcconfig: line 1: //: is a directory #102

Closed JeremyBradshaw7 closed 2 years ago

JeremyBradshaw7 commented 2 years ago

Getting this warning/error on a production build in the console:

ios/rnuc.xcconfig: line 1: //: is a directory

It's because the first line of the file written to the ios folder contains a comment:

// DO NOT COMMIT OR EDIT THIS FILE
VARIANT=CCF
APP_VERSION=1.0.77
APP_BUILD=958
BUILD=Production

Can anything be done about this?

maxkomarychev commented 2 years ago

does it help if you remove the comment?

JeremyBradshaw7 commented 2 years ago

does it help if you remove the comment?

Yes it will, but that file is generated every time you run the rnuc utility.

maxkomarychev commented 2 years ago

This is quite weird btw. It works fine for me. Which version of xcode are you using? afaik // is a correct comment in xcconfig

JeremyBradshaw7 commented 2 years ago

Ah sorry, I see what's happening now. This is in relation to my other query: https://github.com/maxkomarychev/react-native-ultimate-config/issues/93 - where I'm trying to expose the variables to the build script I'm running in. So it's this command that is throwing that error:

set -o allexport; source ios/rnuc.xcconfig; set +o allexport # expose all env file variables

I probably need to preprocess the file with grep or something to avoid it. Closing this now, but I'd still like to know the recommended way to expose the "current" environment variables from this package to a build script.