-
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
Switching iOS Schemes not working #692
Comments
After I clean the build folder it works, what is that? |
I seem to remember that this used to work. The generated file in As a workaround in your Build Pre-actions script touching As an example the script will now look similar to the one below |
@justin-tay It works for me, thanks :)
|
@justin-tay thanks. It works! |
@justin-tay your solution also works thankss 🎉 |
Just wanted to chime in here. I went through tutorials (https://www.youtube.com/watch?v=rhdOWYqc-Cg&t=1551s&ab_channel=JASACADAMY) and set up schemes + targets for my different envs. I was running into the issue where the .env would get overwritten successfully by the correct .env.[environment] file but the actual variables in the code weren't changing (when you used them). Occasionally they would change after multiple clear builds, etc but even then there was no consistency and most of the time that didn't work. Eventually I added everything I could find in the issues here + deleting the builds on the simulator so that they had to be reinstalled and all the sudden switching back and forth between schemes started working and changing the variables every time. So here is what my pre-actions script looks like for each environment:
|
I'm having the same problem, can you share the podfile? |
I get error with version 1.5.0 |
THANK YOU!!! Wasted a lot of time trying to get this library to work, this was the ONLY thing that worked. No cleaning, reset-cache or any other magic necessary! |
this worked for me. I am also working with multiple targets. thank you. |
I followed: https://www.bigbinary.com/books/learn-react-native/handling-environment-specific-configurations-in-react-native
But when I switch from Staging scheme to Production scheme the .env is changes to the correct values. But when I log the variables they don't change. I tried removing the app and running metro with reset-cache but noting changes.
What can I do?
The text was updated successfully, but these errors were encountered: