react-native-obfuscating-transformer
react-native-obfuscating-transformer copied to clipboard
App gets close immediately after release, but without this package works well
Hi,
we had to exclude index.js from transforming by adding it to transformer.js:
const filter = filename => {
return filename.startsWith("app") // all our sources that should be transformed are in folder app
&& !filename.startsWith("app/components/index") // skip this file due to NoSuchKeyException
;
};
Furthermore we've had to add these rules for proguard: https://github.com/facebook/react-native/blob/master/ReactAndroid/proguard-rules.pro
Hope this helps.
Best regards, Marco
Thank you, could you please let me know that what is difference between progaur and this package ?
Proguard is Androids mechanism to obfuscate Java-Files. It looks that it isn't used anymore since Android Gradle Plugin 3.4.0 but it's config files are still used (backwards compatible):
https://developer.android.com/studio/build/shrink-code
Another tip: use the config parameter "enableInDevelopment" (transformer.js) during development so that such errors are revealed before releasing your app. You can disable it after successful testing afterwards to speed things up again in development mode.
this package will not affect on performance ?