- I have 3 environments development, testing, production in my React Native app
- Android is managed by flavours + buildTypes
- iOS is managed by different schema + configurations
- I have a library that serves only testing purposes (sending info about testing sessions like device ids, user names, video recording etc.)
- I don't use this in production at all, it should be only an internal thing
- I manage that now by
if-else
+.env
, but...
I don't want that (potentially risky if misconfigured) library to be in the production build at all. I want to completely exclude it.
How do you manage that for Android and iOS builds? Any tips and tricks are welcome.
I tried to add react-native.config.js
as described in documentation react-native-community dependencies, but then the error Library not found was raised
.
module.exports = {
'my-library-name': {
platforms: {
ios: {
configurations: ['testing'],
},
android: {
buildTypes: ['testingRelease'],
},
},
},
}