Referene1
Referene2
Referene3
Referene4
Referene5
Once we are done with the development of the app somethings are really important like code security, app size, and obfuscation. This blog will explain how you can obfuscate the application in flutter? and how the app size can be reduced in simple steps
In software development, obfuscation is the deliberate act of creating source or machine code that is difficult for humans to understand. This is done to deter reverse engineering which provides code in place and getting leak anywhere.
There are two ways to create a build and upload it to store
App Bundle
Apk
You need to run the below commands as per your need, everyone has their own purpose.
For AppBundle:
Without splitting:
flutter build appbundle --obfuscate --split-debug-info=/<directory>
Splitting:
flutter build appbundle --target-platform android-arm,android-arm64,android-x64 --obfuscate --split-debug-info=/<directory>
For APK:
Without splitting:
flutter build apk --obfuscate --split-debug-info=/<directory>
Splitting:
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi --obfuscate --split-debug-info=/<directory>
The / can be replaced with the relative path of the project or exact location.
Ex:
./ProjectFolderName/debug(It will create ProjectFolderName folder inside your project directory)
/Users/apple/Desktop/items/debug (It will be specific path of folder )
Top comments (0)