This is a list of the plugins required to build this module. Inside of the android/app/build.Let’s take a closer look at each of these sections: In Android:-Īfter the project has opened, we should look for the applicationId key in the android/app/adle file under the defaultConfig block to check our initial package name on Android: In the env files, we must add different base URLs for the network requests. Create 3 env files in the project root directory. Install pod for iOS cd ios & pod install let’s initialize the React Native app using the React Native CLI: npx react-native init envSetup envSetup-Staging, envSetup-Prod as envSetup in Ios In the end, we’ll have the following 4 app variants for both platforms (Android/IOS) with different package names/bundle id, app names, and app icon Injection of the particular.env files into the apps is also possible during CI-to-build processes. This library's main goal is to make it easier for us to store environment/flavor-related constants in straightforward.env files and read their values in our Javascript coding. We'll add React Native Config as a dependency in the following step. The environment-related builds can be used to use different base URLs for the network requests (test data in the Staging environment app build, production data in the Prod environment app build).Īs an example, In the first step, we will create an app called envSetup with Staging and Prod environment-based variants, and set a unique package name/bundle id, app name, and app icon for them, which will enable the installation of different app versions on the same device (each app's package name or bundle id must be unique in Android or iOS).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |