Integrating HUAWEI Game Service Based on Cocos SDKHub — Packaging and Releasing an App

You can release a Cocos-based game in HUAWEI AppGallery Connect.

1. Building Your Version

Sign in to Cocos Creator, choose Project > Build & Release, and perform configurations as follows:

l Select HUAWEI AppGallery Connect as the release platform.

l For a joint operations app or game, the package name must end with .huawei.

l Use the keystore information configured previously.

l In Cocos SDKHub, select the HUAWEI AppGallery Connect config set you need.

l You are advised to deselect Debug Mode. All Huawei SDK APIs require app signature verification, if Debug Mode is selected, the compiler does not sign your app package by default.

2. Compiling Your Version

You can either compile your game in Cocos Creator or Android Studio.

2.1 Compiling in Cocos Creator

In Cocos Creator, go to Project > Build…, and click Compile after the build is complete.

After compilation, you can find the file in $ProjectHome\build\jsb-link\publish\android.

2.2 Compiling in Android Studio

Open the following directory in Android Studio and compile your game.$ProjectHome \build\jsb-link\frameworks\runtime-src\proj.android-studio

3. Uploading Your Version

You can release your game version either by uploading it in Cocos Creator directly after build and compilation, or by uploading the compiled file in AppGallery Connect.

Method 1: Click Upload next to Compile in Cocos Creator. Select a login type, and enter the app ID of your game, which was generated by AppGallery Connect. You can set other parameters according to the actual situation. Click Confirm, and verify your HUAWEI ID in the displayed dialog box. After verification, your game version will be uploaded to AppGallery Connect. You can later sign in to AppGallery Connect and go to My apps > Distribute > Version information to view it.

Method 2: Sign in to AppGallery Connect, go to My apps > Distribute > Version information, click Software package management, and upload your app package.

For more details, check:

Integrating HUAWEI Game Service Based on Cocos SDKHub — Integrating Cocos SDKHub:https://forums.developer.huawei.com/forumPortal/en/topic/0203404602609800136

AppGallery Connect documentation:https://developer.huawei.com/consumer/en/doc/distribution/app/agc-release_app