ionic-cli
ionic-cli copied to clipboard
Add `--packageType` option to Ionic CLI
no description needed
I assume you're referring to --packageType for cordova-ios: https://cordova.apache.org/docs/en/latest/guide/platforms/ios/#using-flags
What is bundle?
Hi,
Update to latest cordova cli and execute this cordova build android -- --packageType="bundle" this will create app-debug.aab file which will contain well optimize apk aka file for both architecture.
Now when you upload apk to google play console you might be getting warning that your app is not well optimized use bundle to optimize your app. With bundle your app size will be reduced/optimized based on architecture.
Issue thread discussion:
- https://github.com/apache/cordova-android/issues/729
- https://github.com/apache/cordova-android/issues/805
PR: https://github.com/apache/cordova-android/pull/764
Ah, yeah. The new Android App Bundles.
What is the specific actionable item for the Ionic CLI here? Using ionic cordova build android -- -- --packageType="bundle" should work. An additional option separator is required because it's wrapping yet another CLI. See the docs for more info.
Thanks a lot @dwieeb. This works, since it works i am closing this thread.
Since Android App Bundles are going to be a more common feature, it may make sense to escalate --packageType as a documented option in the Ionic CLI.
Hey @dwieeb any ETA for this feature in Ionic Applow packaing?
My colleague says no current ETA. We'll likely support it in the Ionic CLI first, so be sure to subscribe.
As bundle is now the default, it would be useful to have this option to be able to build an apk easily
Today this works :
ionic cordova build android --release -- -- --packageType=apk
This would be great :
ionic cordova build android --release --packageType=apk