Publish to Alipay Mini Game
Environment Configuration
Download Alipay Mini Program Studio to the desktop and install it.
Download Alipay and install it on your mobile device.
The minimum version supported of the Alipay client on Android is 10.3.70 and on iOS is 10.3.70.
Publishing Process
Use Cocos Creator to open the project to be published, select Alipay Mini Game in Platform of the Build panel, and then click Build.
Please refer to the build options documentation for general build options settings. The rules for filling out build options related to Alipay Mini Game are as follows:
Build Option | Description | Field Name (for command-line publishing) |
---|---|---|
Start Scene Asset Bundle | When checked, the first scene and its related dependencies will be built into the built-in Asset Bundle - start-scene under the release package directory assets to improve the speed of loading assets for the start scene. | startSceneAssetBundle |
Orientation | Optional values include landscape and portrait . | deviceOrientation |
Resource Server Address | Used to fill in the address of the remote server where the resource is stored. Developers need to manually upload the remote folder in the release package directory to the filled in resource server address after the build. For details, please refer to the Uploading Resources to Remote Servers documentation | remoteUrl |
Polyfills | Build polyfills that support some new features, mainly when packaging scripts. Currently only Async Functions are supported, more features will be opened later. | polyfills |
After the build is finished, click the folder icon button in the bottom left corner of Build Task, you can see that the project folder alipay-mini-game
is created in the build
directory of the project, which already contains the configuration file game.json
for the Alipay Mini Game environment.
Use Alipay Mini Program Studio to open the alipay-mini-game
folder generated by the build to open the Alipay Mini Game project and preview/debug the game content.
Resource management for Alipay Mini Game environment
Alipay Mini Game are similar to WeChat Mini Game in that there is a package size limit, and additional resources over 4MB must be downloaded via network requests.
When the package size is too large, configure the Resource Server Address option in the Build panel to upload the resources to a remote server, please refer to the Upload Resources to Remote Server documentation.
It is recommended to save only the script files in the game package, and download all other resources from the remote server. Cocos Creator has already done the download, cache and version management of remote resources for you, please refer to the Cache Manager documentation.
Restrictions for Alipay Mini Game
The following modules are still not supported:
- WebView
- VideoPlayer
Documentation
Since Alipay Mini Game related documentation is currently only available internally, developers can directly contact the members of Alipay integration group if needed.