To create the info.plist
file of a widget:
Create an XML-formatted document that conforms to the Document Type Definition (DTD) defined by Nokia.
The properties of a widget are defined in the form of key and value
pairs, where a key is a predefined term and a value is a configurable string.
The format of the info.plist
file and the syntax of the key/value
pairs are illustrated in the following sample code:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Nokia//DTD PLIST 1.0//EN" "http://www.nokia.com/NOKIA_COM_1/DTDs/plist-1.0.dtd"> <plist version="1.0"> <dict> <key>DisplayName</key> <string>WidgetName</string> <key>Identifier</key> <string>com.company.widget.projectname</string <key>MainHTML</key> <string>Main.html</string> <key>Version</key> <string>1.0</string> <key>AllowNetworkAccess</key> <false/> > </dict> </plist>
The easiest way to create the info.plist
file is to
copy from a template that already contains all supported keys and then modify
each key accordingly.
Save the XML
document under the widget project root folder with the name info.plist
.
The following table lists the properties supported in the Web Runtime environment.
Property name | Type | Use | Description |
---|---|---|---|
| String | Mandatory | The name of the widget to be displayed in the application menu. |
| String | Mandatory | A unique string identifier for the widget. The identifier should specify the company’s reverse domain format, for example. |
| String | Mandatory | The name of the main HTML file to be loaded when the widget starts running. |
| Boolean | Optional | Access right to network-based resources or data. If the value is |
| String | Optional | The release version of the widget. Widgets support updates where a new version of a widget is provided on the Web and installed on top of the previous widget version on a mobile device. For more information, see "Creating self-updating widgets" in section Managing your widget on the mobile device. |