Skip to content
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

Add --packageType option to Ionic CLI #4187

Open
indraraj26 opened this issue Oct 19, 2019 · 8 comments
Open

Add --packageType option to Ionic CLI #4187

indraraj26 opened this issue Oct 19, 2019 · 8 comments

Comments

@indraraj26
Copy link

no description needed

@ionitron-bot ionitron-bot bot added the triage label Oct 19, 2019
@imhoffd
Copy link
Contributor

imhoffd commented Oct 22, 2019

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?

@indraraj26
Copy link
Author

indraraj26 commented Oct 28, 2019

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:

  1. Support new Android App Bundle package format apache/cordova-android#729
  2. Google Play enhanced 64bit build check, how to build without crosswalk for 64bit app bundle? apache/cordova-android#805

PR: apache/cordova-android#764

@imhoffd
Copy link
Contributor

imhoffd commented Oct 28, 2019

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.

@indraraj26
Copy link
Author

Thanks a lot @dwieeb. This works, since it works i am closing this thread.

@imhoffd
Copy link
Contributor

imhoffd commented Oct 29, 2019

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.

@imhoffd imhoffd changed the title add -- --packageType=bundle Add --packageType option to Ionic CLI Oct 29, 2019
@imhoffd imhoffd reopened this Oct 29, 2019
@timbru31
Copy link

Hey @dwieeb any ETA for this feature in Ionic Applow packaing?

@imhoffd
Copy link
Contributor

imhoffd commented Nov 13, 2019

My colleague says no current ETA. We'll likely support it in the Ionic CLI first, so be sure to subscribe.

@QuentinFarizon
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants