Manifest
This page describes the use of the manifest file in Crosswalk for iOS web applications.
The manifest file (e.g. manifest.plist) is located in your project source and used to specify meta data for your application (title, icon, etc.) as well as how it should behave and present itself.
Crosswalk for iOS uses json format as its manifest format, and based on the W3C Manifest for Web Application. Crosswalk for iOS also extends the W3C manifest spec with additional fields prefixed with xwalk_ keyword.
The currently supported member fields are below:
| Field Name | Type | Description |
|---|---|---|
| start_url | String | Defines the start url of the web application |
| xwalk_extensions | Array | Information of the packaged Crosswalk Extensions |
| cordova_plugins | Array | Information of the packaged Cordova plugins |
xwalk_extensions
The type of the items in xwalk_extension should be String, defined as follows:
| Type | Description | Example |
|---|---|---|
| String | The packaged extension namespace | "xwalk.experimental.presentation" |
cordova_plugins
Since the Cordova plugin support is based on the Cordova Extension, we need to add "xwalk.cordova" in the xwalk_extension section to enable it.
The type of the items in cordova_plugins should be Dictionary. Every item should have the definitions as follows:
| Key | Value type | Content | Example |
|---|---|---|---|
| class | String | The native entry class type of the Cordova plugin | "CDVFile" |
| name | String | The namespace of the Cordova plugin in JavaScript | "File" |
Example
{
"start_url": "index.html",
"xwalk_extensions": [
"xwalk.cordova",
"xwalk.experimental.presentation"
],
"cordova_plugins": [
{
"class": "CDVFile",
"name": "File"
},
{
"class": "CDVDevice",
"name": "Device"
}
]
}
English
