Giter Site home page Giter Site logo

Comments (11)

vishuTheDevloper avatar vishuTheDevloper commented on June 26, 2024 2

ToshKoevoets macrozone januswel uwbobanminic midrizi The easiest way for now is to add script
rm "${SRCROOT}/../node_modules/react-native-config/ios/ReactNativeConfig/GeneratedDotEnv.m"
This will not hamper your derived folder

Just add this script inside build phase click + and then New run script phase ->> Then add The above line
but make sure to place the script at top of every one

if you have multiple Targets then add in each target Build phase same script
Attaching screen shot reference

Screenshot 2023-10-06 at 6 14 44 PM

from react-native-config.

natemartins avatar natemartins commented on June 26, 2024 2

Please, how can this be done for Android?

from react-native-config.

januswel avatar januswel commented on June 26, 2024 1

@uwbobanminic

react-native-config generates a native-readable source file for each platform, before building

That's why deleting the cache works so well

I think it would be good to add a comparison the last modification time of .env and the one of the last build, and regenerates if those are different

from react-native-config.

macrozone avatar macrozone commented on June 26, 2024

i just run into the same problem, is this a new? I had the impression it worked before without deleting derivedData

from react-native-config.

midrizi avatar midrizi commented on June 26, 2024

@luancurti

Same issue, initially suspected it might be related to our project. However, after testing 'Example/0.68.5', it appears the issue is not project-related.

from react-native-config.

januswel avatar januswel commented on June 26, 2024

I have added the script to delete the build cache before every building

image

This works file!!

from react-native-config.

ToshKoevoets avatar ToshKoevoets commented on June 26, 2024

from react-native-config.

uwbobanminic avatar uwbobanminic commented on June 26, 2024

I'm having the same issue, but fixed it in suggested way on deleting rn-config cache.

Question is, do you know why this is happening?

from react-native-config.

7dp avatar 7dp commented on June 26, 2024

In my experience i need to clean my build everytime i switch to another scheme before running it on the device using XCode.
Sure this slowing down the build time significantly.

from react-native-config.

7dp avatar 7dp commented on June 26, 2024

But if i run the app through the cli without cleaning the build then it works. I don't to need to clean the build everytime i switch between scheme.
I run it like this:

ENVFILE=.env.production react-native run-ios --scheme 'YourProdScheme'

So for now i always run the ios app through the cli and doesn't therough XCode.

Hope it helps someone, thanks.

from react-native-config.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.