globocom / react-native-ua

React Native module for Urban Airship
MIT License
37 stars 33 forks source link

Switch `inProduction` key automatically #53

Closed jsfr closed 7 years ago

jsfr commented 7 years ago

I tend to forget that I need to switch the key inProduction to true whenever I want to build a release of an android app.

Is there any way we can set this key to automatically be false when running in debug/dev mode, and true when running in production?

rlepinski commented 7 years ago

That would be great and probably better suited for an issue in the core SDK - https://github.com/urbanairship/android-library. Ill create an internal jira ticket to investigate this for the next release. In the past I have not been able to figure out how to determine debug vs release from a library, but I might be missing something.

For now, you can use https://developer.android.com/studio/build/build-variants.html to setup debug and release airship config files.