0

Why do I have to clean my build folder in XCode to see the new env values in my app?

If I run an env script and then a different env script it will show the values of the previous env file. e.g if i run dev env script it will show dev env values still after i have run the staging env script (unless I clean build).

How can I prevent this?

(I am using a brand-new template typescript build)

I have followed this short tutorial:

https://www.bigbinary.com/books/learn-react-native/handling-environment-specific-configurations-in-react-native

I have added .env .env.development .env.staging .env.production with three an additional 3 schemes production, development, and staging.

jrs
  • 135
  • 1
  • 16

0 Answers0