-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't make it work #2
Comments
Hi @ramsestom ! By default, this transformer only obfuscates files in your src directory, but leaves node_modules untouched. If you inspect the bundle, it may look unobfuscated for the most part, since such a large portion of it will come from node_modules. If your project-specific files are indeed also unobfuscated, I'm happy to offer more help. |
I checked and my project-specific code is also unobfuscated in the bundle. |
I have tested this with "react-native": "^0.55.2" and it seems to work okay. Note that I didn't use |
not work for me either, |
No obfuscation as far as I can tell here. |
Same as us, no obfuscation on our specific code. |
same here |
same here :(
did anyone of you found at least a workaround? |
same here... These are my setting below.
// transformer.js
const obfuscatingTransformer = require("react-native-obfuscating-transformer");
const typescriptTransformer = require("react-native-typescript-transformer");
module.exports = obfuscatingTransformer({
upstreamTransformer: typescriptTransformer,
}); // rn-cli.config.js
module.exports = {
getTransformModulePath() {
return require.resolve('react-native-typescript-transformer');
},
transformer: {
babelTransformerPath: require.resolve("./transformer")
},
}; i execute this command, but no diff are shown before no obfuscation.
|
Can you please provide the steps you followed. |
The same on 0.59.10. Tried the above method as well. |
With react-native hermes engine, I think you don't need obfuscator any more. it's compiled to bytecode. |
hermes engine just work in android,but what ios can do |
Hey guys I would suggest to use https://github.com/javascript-obfuscator/javascript-obfuscator directly on your bundle. It will make obfuscation more efficient in sense that it will obfuscate code so much more... But probably at cost - your app will be more slow. Also note that for ios you will be able to get it work, but for android with hermes enabled I am not sure how to done it at the moment. Also note that with hermes it is true that result bundle is some kind of bytecode but big portion of strings are not "obfuscated" by hermes in our case... |
I finally figured out how to make it work after several test. my react and react native version:
install other dependencies needed:
transformer.js
metro.config.js
NOTE: set emitObfuscatedFiles to true in obfuscatorOptions to emit the obfuscated versions of files alongside their originals, for comparison. If you're building in release, you can also compare the generated index.android.bundle (located in \android\app\build\generated\assets\react\release) with and without using the react-native-obfuscating-transformer using online diff tool to see the difference |
I am getting this error: getTargets (/Users/apple/Desktop/DemoObfuscateDemo/node_modules/react-native-obfuscating-transformer/node_modules/inversify/lib/planning/reflection_utils.js:32:15) |
any solution for this ? |
same issue here, it seems to work on 99% of my source files, but throws on (at least) one of my components. |
@fesoares you need to use javascript-obfuscator version 1.1.0 or upper |
not work for me either, |
this plugin just dont work. |
Hi
I am trying to use this module. I created the rn-cli.config.js and transformer.js file in my project root folder and kept the default obfuscatingTransformer options (So
module.exports = obfuscatingTransformer({})
).But this doesn't seem to work. The index.android.bundle file in the generated app-release.apk still remains unobfuscated (I performed a
gradlew assembleRelease
like usual to create the bundle beforereact-native run-android --variant=release
)What am I doing wrong?
The text was updated successfully, but these errors were encountered: