抱歉,该网页目前还不存在中文版本,请继续浏览其他网页!

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 NameTypeDescription
start_urlStringDefines the start url of the web application
xwalk_extensionsArrayInformation of the packaged Crosswalk Extensions
cordova_pluginsArrayInformation of the packaged Cordova plugins

xwalk_extensions

The type of the items in xwalk_extension should be String, defined as follows:

TypeDescriptionExample
StringThe 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:

KeyValue typeContentExample
classStringThe native entry class type of the Cordova plugin"CDVFile"
nameStringThe 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"
        }
    ]
}