-
-
Notifications
You must be signed in to change notification settings - Fork 237
Open
Description
A heads up. We have found that in it's current instantiation if you are publishing anything that uses react-native-inappbrowser in your a react native app with the following rules (below) in your app build.gradle, then the browser Options relating to colour on the customtab do not get parsed. i.e. the colour of the browser customtab stays default.
EG: if you have this block in your release
minifyEnabled = true
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
proguardFile "${rootProject.projectDir}/../node_modules/detox/android/dedox/proguard-rules-app.pro"
then the colour options such as
import {InAppBrowser } from 'react-native-inappbrowser';
await InappBrowser.open(url, {
toolbarColor: '#00FF00',
navigationBarColor: '#00FF00',
navigationBarDividerColor: '#00FF00',
});
the colour '#00FF00' will work in dev, but be ignored when you release the app as proguard will whittle it
the solution is to alter the proguard-rules.pro file to state the following
-keepclassmembers class androidx.browser.customtabs** {
*;
}
Which platform(s) does your issue occur on?
- Android/
- device.
Metadata
Metadata
Assignees
Labels
No labels