Note that there are some explanatory texts on larger screens.

plurals
  1. POIBM Worklight 5.0.x - Changing the main HTML filename
    text
    copied!<p>I want my main html file to have a different name than my project. </p> <p>I have found that Worklight will not reconnect if I don't use the same name. I have tried changing the mainFile tag in the application-descriptor.xml and changing the wlMainFile entry in worklight.plist on iOS.</p> <p>Direct Update does not work. More importantly the application does not reconnect and I get a grey screen (presumably because iOS is trying to launch using the wrong file). </p> <p>For example:</p> <pre><code>Project name: MyProject main file: home.html application-descriptor.xml: &lt;mainFile&gt;home.html&lt;/mainFile&gt; worklight.plist: &lt;wlMainFile&gt;home.html&lt;/wlMainFile&gt; </code></pre> <p>The above does not work.</p> <p>[Edited later to add my application-descriptor.xml]</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt; &lt;!-- Licensed Materials - Property of IBM 5725-G92 (C) Copyright IBM Corp. 2006, 2012. All Rights Reserved. US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. --&gt; &lt;!-- Attribute "id" must be identical to application folder name --&gt; &lt;application xmlns="http://www.worklight.com/application-descriptor" id="agent" platformVersion="5.0.6"&gt; &lt;displayName&gt;My app&lt;/displayName&gt; &lt;description&gt;My application description &lt;/description&gt; &lt;author&gt; &lt;name&gt;Redacted&lt;/name&gt; &lt;email&gt;redacted@foo.com&lt;/email&gt; &lt;homepage&gt;http://redacted.com&lt;/homepage&gt; &lt;copyright&gt;(c) redacted LLC&lt;/copyright&gt; &lt;/author&gt; &lt;height&gt;748&lt;/height&gt; &lt;width&gt;1024&lt;/width&gt; &lt;mainFile&gt;home.html&lt;/mainFile&gt; &lt;thumbnailImage&gt;common/images/ipad-app-icon.png&lt;/thumbnailImage&gt; &lt;!-- --&gt; &lt;ipad bundleId="com.redacted.myproject" version="1.0"&gt; &lt;worklightSettings include="true"/&gt; &lt;security&gt; &lt;encryptWebResources enabled="false"/&gt; &lt;testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3"/&gt; &lt;/security&gt; &lt;/ipad&gt; &lt;!-- --&gt; &lt;android version="1.0"&gt; &lt;worklightSettings include="true"/&gt; &lt;security&gt; &lt;encryptWebResources enabled="false"/&gt; &lt;testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3"/&gt; &lt;publicSigningKey&gt;Replace this text with the public key of the certificate with which you sign the APK. For details see the Worklight Developer's Reference Guide.&lt;/publicSigningKey&gt; &lt;/security&gt; &lt;/android&gt; &lt;worklightServerRootURL&gt;http://${local.IPAddress}:8080&lt;/worklightServerRootURL&gt; &lt;/application&gt; </code></pre> <p>So, to be clear, if I have encountered an issue with my mainFile being a name other than the project name. Worklight does not always call the filename specified by mainfile, especially after the initial use of the application.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload