メインの html ファイルにプロジェクトとは異なる名前を付けたいです。
同じ名前を使用しないと Worklight が再接続しないことがわかりました。iOS で application-descriptor.xml の mainFile タグを変更し、worklight.plist の wlMainFile エントリを変更してみました。
ダイレクト アップデートは機能しません。さらに重要なのは、アプリケーションが再接続せず、灰色の画面が表示されることです (おそらく、iOS が間違ったファイルを使用して起動しようとしていることが原因です)。
例えば:
Project name: MyProject
main file: home.html
application-descriptor.xml: <mainFile>home.html</mainFile>
worklight.plist: <wlMainFile>home.html</wlMainFile>
上記は機能しません。
[後で編集して application-descriptor.xml を追加]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- 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. -->
<!-- Attribute "id" must be identical to application folder name -->
<application xmlns="http://www.worklight.com/application-descriptor" id="agent" platformVersion="5.0.6">
<displayName>My app</displayName>
<description>My application description </description>
<author>
<name>Redacted</name>
<email>redacted@foo.com</email>
<homepage>http://redacted.com</homepage>
<copyright>(c) redacted LLC</copyright>
</author>
<height>748</height>
<width>1024</width>
<mainFile>home.html</mainFile>
<thumbnailImage>common/images/ipad-app-icon.png</thumbnailImage>
<!-- -->
<ipad bundleId="com.redacted.myproject" version="1.0">
<worklightSettings include="true"/>
<security>
<encryptWebResources enabled="false"/>
<testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3"/>
</security>
</ipad>
<!-- -->
<android version="1.0">
<worklightSettings include="true"/>
<security>
<encryptWebResources enabled="false"/>
<testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3"/>
<publicSigningKey>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.</publicSigningKey>
</security>
</android>
<worklightServerRootURL>http://${local.IPAddress}:8080</worklightServerRootURL>
</application>
したがって、明確にするために、mainFile がプロジェクト名以外の名前であるという問題が発生した場合。Worklight は、特にアプリケーションの最初の使用後に、mainfile によって指定されたファイル名を常に呼び出すとは限りません。