如何模糊我的反应原生JS代码?我在build.gradle文件中设置了以下内容:
release {
minifyEnabled true
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
Run Code Online (Sandbox Code Playgroud)
这是我的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 …Run Code Online (Sandbox Code Playgroud) react-native expo 生成的 apk 是否被混淆?
exp build:android
Run Code Online (Sandbox Code Playgroud)
如何使用该 apk 取回我的 React Native JS 源代码?为此,我是否需要 dex 到 Java 编译器?
寻找您的宝贵建议,因为我担心我的 React Native 应用程序的安全性并试图比较混淆代码与非混淆代码
reverse-engineering apk react-native react-native-android expo
我有两个自定义挂钩,即useFetch和useAuth。useAuth具有所有 API 调用方法(例如 logIn、logOut、register、getProfile 等),并且它们使用useFetch钩子方法进行 API 调用。useFetch也使用这些方法,例如 API 返回 401 时的 logOut 方法、setToken 等。因此,它们都需要共享通用方法。但这会导致循环依赖和调用大小堆栈超出错误。如何管理这个
使用Fetch.js
import React, { useState, useContext } from "react";
import { AuthContext } from "../context/authContext";
import { baseURL } from "../utils/constants";
import { useAuth } from "./useAuth";
const RCTNetworking = require("react-native/Libraries/Network/RCTNetworking");
export const useFetch = () => {
const {token, setAuthToken, isLoading, setIsLoading, logIn, logOut} = useAuth();
const fetchAPI = (method, url, body, isPublic, noBaseURL) => …Run Code Online (Sandbox Code Playgroud)