Open sahad00 opened 1 week ago
I'm unsure about why you're using window.
.
You should be fine with just:
if (__DEV__) {
console.log('I am in debug');
}
@cortinico I tried using the above code but still it gives me false on debug build leading to PRODUCTION = true on debug build based on the below code
let isProduction =__DEV__ ? false : true;
@cortinico I want to keep this DEV true disabling all developer option for debug build
You'll have to provide a reproducer using https://github.com/react-native-community/reproducer-react-native as we can't help you further otherwise
@sahad00 You mentioned that you are using this command:
"build:android": "react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res",
It specifies --dev false
, this is why the value of isProduction
is true
: you are building an app in production mode.
It specifies
--dev false
, this is why the value ofisProduction
istrue
: you are building an app in production mode.
True. @sahad00 why are you using a custom bundle command and not the default toolchain?
@cortinico
if I manually set this to true then things are good,
@Override
public boolean getUseDeveloperSupport() {
return true;
}
@cortinico its something like release build on debug configs , we usually have it to be tested
getUseDeveloperSupport
should be configured as such:
@cortinico
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
this is not working properly when I install on device but setting it manually to true works
10-10 17:55:26.503 12239 12239 D MainApplication: BuildConfig.DEBUG: true
10-10 17:55:26.510 12239 12239 W Looper : PerfMonitor longMsg : seq=3 plan=17:55:24.700 late=0ms wall=1806ms h=android.app.ActivityThread$H w=110 procState=-1
10-10 17:55:26.516 12239 12323 I PowerHalWrapper: PowerHalWrapper.getInstance
10-10 17:55:26.516 12239 12239 I MSYNC3-VariableRefreshRate: Variable refreshrate is disabled
10-10 17:55:26.523 12239 12327 D libMEOW : meow new tls: 0xe6a37d00
10-10 17:55:26.524 12239 12327 D libMEOW : meow reload base cfg path: na
10-10 17:55:26.524 12239 12327 D libMEOW : meow reload overlay cfg path: na
10-10 17:55:26.526 12239 12327 E QT : [QT]file does not exist
10-10 17:55:26.527 12239 12327 D libMEOW : applied 1 plugins for [com.swific.registerbook.debug]:
10-10 17:55:26.527 12239 12327 D libMEOW : plugin 1: [libMEOW_gift.so]: 0xf27bb800
10-10 17:55:26.527 12239 12327 D libMEOW : rebuild call chain: 0xe6a09c40
10-10 17:55:26.528 12239 12327 D libMEOW : meow delete tls: 0xe6a37d00
I tried logging with add logcat but the value is cool I am not sure why its buggy
I tried logging with add logcat but the value is cool I am not sure why its buggy
Without a reproducer we can't help further
@cortinico will make one
Introduction
Earlier I used to detect the env based like this
problem is that isProduction is true on debug build I have generated
build command used
Details
app/build.gradle
I am unable to figure out the issue please help
gradle.properties