-
Notifications
You must be signed in to change notification settings - Fork 0
Crosswalk manifest
Crosswalk currently follows the manifest format used by Chromium packaged applications.
However, many of the features are not yet supported in Crosswalk.
-
name: A plain text string that identifies the application. This field does not yet support internationalisation.
-
version: A string containing one to four dot-separated integers identifying the application version; for example: "2", "1.2", "1.3.0", "4.0.0.11". A couple of rules apply to the integers: they must be between 0 and 65535, inclusive; and you can't prefix any non-zero values with "0" (e.g. "01.1" is invalid).
-
app: Specifies the application entry point. It must contain one of the fields below:
-
launch: Specifies a normal page to use as the app entry point. It must contain a local_path field which sets a path to an HTML page, relative to the application's root.
Note: app.launch.local_path is the only supported entry point for applications on Crosswalk Android.
-
main: Specifies a main document (a.k.a. "event page") to use as the application entry point. This field should itself contain either:
- A source field, which sets the main document's local path.
- OR
- A scripts array to specify JavaScript files. These will be loaded into an automatically-generated main document.
If both source and scripts are specified, source takes precedence.
-
Note that if both launch and main are specified, main takes precedence.
The following fields are not required by the manifest specification, but are available:
- description: A text string describing the application.
- icons: Specifies icon graphics files to use for the application. The "128" size icon should be set as a minimum. If it's not given, the Crosswalk default logo icon will be used.
- permissions (Crosswalk 4 or later): This field defines which features are used by the application. See the permissions support in Crosswalk.
- content_security_policy (Crosswalk 4 or later): The "content_security_policy" field represent the CSP policy which should be enforced for the application. CSP be disabled if this field is not set.
This is an example of the minimal amount of metadata required in a manifest:
{
"name": "Calculator",
"version": "1.1.3.1",
"app": {
"launch":{
"local_path": "calculator.html"
}
}
}
Another example, using main.scripts instead of a launch object:
{
"name": "Calculator",
"version": "1.1.3.1",
"app": {
"main":{
"scripts": ["main.js"]
}
}
}
and an example using main.source:
{
"name": "Calculator",
"version": "1.1.3.1",
"app": {
"main":{
"source": "main.html"
}
}
}
Here is the complete manifest file which contains all fields supported by Crosswalk (Crosswalk 1, Crosswalk 2, Crosswalk 3):
{
"name": "app name",
"version": "1.0.0",
"app": {
"main":{
"scripts": ["main.js"],
"source": "main.html"
},
"launch":{
"local_path": "index.html"
}
},
"description": "a sample description",
"icons": {
"128": "icon128.png"
}
}
This example shows additional fields supported by Crosswalk 4:
{
"name": "app name",
"version": "1.0.0",
"app": {
"main":{
"scripts": ["main.js"],
"source": "main.html"
},
"launch":{
"local_path": "index.html"
}
},
"content_security_policy": "script-src 'self'",
"permissions": [
"Contacts",
"Geolocation",
"Messaging"
],
"description": "a sample description",
"icons": {
"128": "icon128.png"
}
}
Field | Platform | Canary | Crosswalk 1 | Crosswalk 2 | Crosswalk 3 | Crosswalk 4 |
---|---|---|---|---|---|---|
name | Tizen | Yes | Yes | Yes | Yes | Yes |
Android | Yes | N/A | Yes | Yes | Yes | |
version | Tizen | Yes | Yes | Yes | Yes | Yes |
Android | Yes | N/A | Yes | Yes | Yes | |
app.launch.local_path | Tizen | Yes | Yes | Yes | Yes | Yes |
Android | Yes | N/A | Yes | Yes | Yes | |
app.main.source | Tizen | Yes | Yes | Yes | Yes | Yes |
Android | N/A | N/A | N/A | N/A | N/A | |
app.main.scripts | Tizen | Yes | Yes | Yes | Yes | Yes |
Android | N/A | N/A | N/A | N/A | N/A | |
description | Tizen | Yes | Yes | Yes | Yes | Yes |
Android | Yes | N/A | Yes | Yes | Yes | |
icons | Tizen | Yes | Yes | Yes | Yes | |
Android | Yes | N/A | Yes | Yes | Yes | |
content_security_policy | Tizen | Yes | N/A | N/A | N/A | Yes |
Android | N/A | N/A | N/A | N/A | N/A | |
permissions | Tizen | |||||
Android | N/A | N/A | N/A | N/A | Yes |