Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejava
MobileProtect.init(this, R.xml.mobileprotect);

5. Optional: configuration for static obfuscation

If static obfuscation is enabled for a Cordova project then the following proguard rules must be added to your proguard-rules.pro file in order to prevent plugins from breaking:

Code Block
-dontwarn kotlin.reflect.jvm.KCallablesJvm
-keep class org.apache.cordova.** {*;}
-keep class * extends org.apache.cordova.CordovaPlugin {*;}

If your project does not contain a proguard-rules.pro file you can add one in platforms/android/app/build.gradle

Code Block
android {
    //...
    buildTypes {
        release {
            //...
            proguardFiles("proguard-rules.pro")
        }
    }
}

...

Other Installation Guides

...