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

Build android apk release #64

Open
michaelleung0o0 opened this issue Sep 19, 2023 · 5 comments
Open

Build android apk release #64

michaelleung0o0 opened this issue Sep 19, 2023 · 5 comments
Labels
question Further information is requested

Comments

@michaelleung0o0
Copy link

I build successfully, but when i open the app it stuck on splash screen "Super App Showcase", it seems can't bundle the development server into the apk file, as the file size just around 22mb. So how to include all mini app into main "host" app when build the release apk file. thanks

@michaelleung0o0 michaelleung0o0 added the question Further information is requested label Sep 19, 2023
@jbroma
Copy link
Member

jbroma commented Sep 19, 2023

Hey @michaelleung0o0,

If you are running the super app showcase on android, you probably forgot to run yarn adb:reverse so the app fails to start as it can't fetch the auth module. If not - please provide more details about your environment, thanks!

@michaelleung0o0
Copy link
Author

michaelleung0o0 commented Sep 19, 2023

i run -> yarn start,
and then -> yarn adbreverse,
then run -> yarn run:host:android.
For this flow, it's work. I can access all the feature/ mini app
That means i can run it successfully no matter android/ios

And then I wanna build a prod apk and hope that it will include all the mini app in "host",
so that i setup all the android release setting, and run ./gradlew assembleRelease,
It build successfully, but when i open the app, it just keep on splash screen "Super App Showcase".
And I believe that I may miss some step, it should be need to bundle the other mini app into the "host" app.
But i don't know how to do that

@jbroma
Copy link
Member

jbroma commented Sep 19, 2023

When building for production, we are not bundling mini-apps into the host app, the idea is to have the mini-app bundles on a server/CDN and download them in runtime. So the following steps need to be done:

  1. Deploy the catalog-server with production bundles
  2. Build the app with env CATALOG_SERVER_URL=... where you should put an URL of your deployed catalog-server

@michaelleung0o0
Copy link
Author

michaelleung0o0 commented Sep 20, 2023

  1. So for this example, i tried to run yarn bundle for all the mini app( auth, booking, dashboard, shell, shopping ),
    I saw a folder "android/remotes" will be generated
    and then deploy "catalog-server" in production server
    but i am not sure where should i push the generated files

  2. where can i find CATALOG_SERVER_URL?, i just see catalog-server -> getContainersURL -> hostname is a similar field. thanks for your help

@Havanika28
Copy link

Unable to build apk file.It crashes.
While creating a debug version , I am not able to fetch the miniapp data although I am bundling it.
Please help out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants