

In Android, debug and releases are called build types, and staging and production are called product flavors. Projects can contain one or more targets, each of which produces one product

A target defines a single product it organizes the inputs into the build system - the source files and instructions for processing those source files - required to build that product. A target specifies a product to build and contains the instructions for building the product from a set of files in a project or work-space. For example, it is common to have separate build configurations for debug and release builds of a product. A build configuration specifies a set of build settings used to build a target’s product in a particular way. In iOS, debug and releases are called build configurations, and staging and production are called targets. There are some terminologies we needed to remember.

Build configuration, target, build types, production flavor, and build variant In this post, we will do just like we did with native apps, so that we know the basic steps. There will of course, be tons of libraries to help us with managing different environments. Let’s call our app MyApp and bootstrap it with react-native init MyApp. In fact, to add a staging and production environment, and to add app icons, requires us to use Xcode and Android Studio, and we do it the same way we do with native iOS or Android projects.

For example, we might need multiple skins, themes, a free and paid version, or more often different staging and production environments.Īnd the task that we can’t avoid is adding app icons and splash screens to our apps. And for each app that we build, there are times we need to reuse the same code, build and tweak it a bit to make it work for different environments. React Native was designed to be “learn once, write anywhere,” and it is usually used to build cross platform apps for iOS and Android. By Khoa Pham How to add app icons and splash screens to a React Native app in staging and production
