We use essential cookies for the website to function, as well as analytics cookies for analyzing and creating statistics of the website performance. To agree to the use of analytics cookies, click "Accept All". You can manage your preferences at any time by clicking "Cookie Settings" on the footer. More Information.

Only Essential Cookies
Accept All

manifest Configuration File

manifest.json

The manifest.json configuration file contains information such as quick game description, API declarations, and page routing.

Expand

Attribute

Type

Mandatory

Description

package

string

Yes

Quick game package name.

name

string

Yes

Quick game name.

appType

string

  • Yes (for runtime quick games)
  • No (for HTML5 quick games)

Quick game type.

  • For a runtime quick game, set this attribute to fastgame.
  • For an HTML5 quick game, set this attribute to fastapp or leave it empty.

icon

string

Yes

Quick game icon. The icon must be the same as the that reviewed for release in AppGallery Connect.

versionName

string

No

App version name. For example, 1.0.

versionCode

integer

Yes

App version number. The value starts from 1 and is incremented by 1 each time you upload a package. If the value is incorrect, a version update will fail. For example, if the version code of the original version is 11, the version code of the updated version must be 12.

minPlatformVersion

integer

Yes

Minimum platform version number. The default value is 1000. This attribute is used for compatibility check to avoid incompatibility issues when a released quick game runs on a platform of an earlier version.

NOTE

If the quick game engine version is lower than the value of this parameter, a dialog box will be displayed, prompting the user to update the quick game to the latest version when the user opens the quick game in Quick App Center or Petal Lite Games. If the user chooses not to update the quick game, the user will be forced to exit Quick App Center or Petal Lite Games.

config

object

Yes

System configuration information. For details, please refer to config.

display

object

No

UI display configuration. For details, please refer to display.

subpackages

object

No

Defines and enables subpackage loading. For details, please refer to subpackages.

config

It is used to define the system configuration and global data.

Expand

Attribute

Type

Mandatory

Default Value

Description

logLevel

string

Yes

log

Log printing level.

  • off
  • error
  • warn
  • info
  • log
  • debug

display

It is used to define the configuration related to UI display.

NOTE

For large-screen devices, fullScreen must be set to true and orientation must be set to landscape.

Expand

Attribute

Type

Default Value

Description

backgroundColor

string

#ffffff

Window background color.

fullScreen

boolean

false

Indicates whether the full-screen mode is enabled. In full-screen mode, the status bar is covered.

menu(1076+)

boolean

false

Whether to display the menu button in the upper right corner. In platform version 1076 and later versions, the menu is always displayed and the menu content cannot be customized.

windowSoftInputMode(1030+)

adjustPan | adjustResize

adjustPan

Adjustment mode of the current page to ensure the visibity of text boxes on the page when the soft keyboard is displayed.

  • adjustPan: moves the page up.
  • adjustResize: resizes the display area of the page. If the page is displayed in full screen, this attribute does not take effect.

pages

object

-

Page display style.

orientation

string

portrait

Page display orientation.

  • portrait
  • landscape
  • auto(1070+): depends on the auto-rotate setting of the phone system. If this value is used, you are advised to use the responsive layout for development.

subpackages

It is used to define the configuration related to subpackages. For details about how to use subpackages, please refer to Loading by Subpackage.

Expand

Attribute

Type

Description

name

string

Subpackage name. The name can contain only letters, digits, and underscores (_). base is a reserved name of the basic package. You do not need to define the subpackage configuration for the basic package.

resource

string

Root directory of the subpackage resources, which is relative to the src source code directory. The root directory can contain only letters, digits, underscores (_), hyphens (-), and slashes (/). The first character cannot be a hyphen (-) or slash (/). All resources in this directory are packaged into a subpackage during compilation.

Sample Code

{
  "package": "com.company.unit",
  "name": "appName",
  "icon": "/Common/icon.png",
  "versionName": "1.0",
  "versionCode": 1,
  "minPlatformVersion": 1000,
  "config": {
    "logLevel": "off"
  },
  "display": {
    "backgroundColor": "#ffffff",
    "fullScreen": false,
    "pages": {
      "Hello": {
        "backgroundColor": "#eeeeee",
        "fullScreen": true,
      }
    }
  },
  "subpackages": [
      {
          "name": "pkgA",
          "resource": "PackageA"
      },
      {
          "name": "pkgB",
          "resource": "PackageB"
      }
  ],
}
Search
Enter a keyword.