AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
React native fastlane8/10/2023 ![]() ![]() To run the app using one of the build types defined above, go to View -> Tool Windows -> Build Variants and select the variant (in the newly exposed window) before building: You might encounter problems with Proguard for release builds. Then, I have to create 3 env files in the root of the project: one for the local environment, simply called. As I'm writing this, the latest version for react-native-config is 0.11.7. It's most likely that those vars are going to be different across environments, while the code is not.įirst of all, I'm going to add the library to the project. By doing so, I am keeping the config variables away from the code. To expose env variables to react-native, I'm going to use the react-native-config library. So to avoid headaches, we're going to use environment variables. Do this by hand every time you make a build and at some point I guarantee you're going to miss something. plist file, update the crashlytics key and update the analytics key. Things only get harder and much more error-prone when you have to change the API host, put the payment gateway key, payment gateway host, set the notifications. You switch the API host to the production one and bam, you're done. It's a breeze to change a config when there's only one or two changes to be done. I originally posted this on around25's blog. But it saves you a great deal of developer hustle. It doesn't change the way your React Native app looks, feels or sells. At least mine did, as soon as I learned how to manage staging and production environments in React Native. Your life as a React Native developer is just about to get easier. ![]()
0 Comments
Read More
Leave a Reply. |