模糊包括JavaScript代码的整个React Native应用程序

问题描述 投票:12回答:1

如何混淆我的本机JS代码?我在build.gradle文件中设置了以下内容:

release {
      minifyEnabled true
      proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
 }

这是我的proguard-rules.pro文件(默认):

# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

但是仍然在解压缩apk之后,我仍然可以找到我的JS组件名称,变量和URL's>

如何混淆我的本机JS代码?我在build.gradle文件中设置了以下内容:release {minifyEnabled true proguardFiles getDefaultProguardFile(“ proguard-android.txt”),“ ...

android ios react-native proguard reverse-engineering
1个回答
12
投票

由于您的React Native JavaScript代码是基于Android和iOS的本机代码构建的,因此整个混淆过程将考虑所有这三个代码库:

© www.soinside.com 2019 - 2024. All rights reserved.