I'm deploying a worklight 6.2 application for iphone (ios 7) environment. I managed to enable Application Authenticity for iphone. When Application Authenticity feature is enabled, the direct update feature fails. On the iphone, after I tap on "OK" button when receiving new updates, the application download the update for awhile then show: direct update failed (Direct Update Failure). I all so see this error log in the xcode console:
***014-12-16 19:32:16.487 OnlineBanking[14685:132821] Splash screen image is Default
2014-12-16 19:32:16.487 OnlineBanking[14685:132821] iPhone 5 is detected. Splash image name is: Default-568h
2014-12-16 19:32:18.991 OnlineBanking[14685:133123] [ERROR] [WL_DIRECT_UPDATE] -[WLDirectUpdateDownloader logInvalidUpdateFileData] in WLDirectUpdateDownloader.m:428 :: Invalid update data format: /*-secure-
{"WL-Authentication-Failure":{"wl_authenticityRealm":{"reason":"Invalid gadget request format: \/OnlineBanking\/iphone\/0.1skin=default. Unknown handler path: 0.1"}}}*/QSwcIAAAAAAIAAAAAAAAAUEsDBBQACAgIAIKckEUAAAAAAAAAAAAAAAAgAAAAZGVmYXVsdC9i
b3dlci9hbmd1bGFyL2FuZ3VsYXIuanPMvetaG0fWMPqfq2iI30jCojEkky8jjD3ExgkzPr2GTGZe
zJhGaom2RbfS3TJmbL5n38O+w30le52qalV1S2CPs7+tPMFSnQ+rqtZ5rWyuR39N3ieHwzKb1dGw
yOs0r6NxWVxEZ8VlWm4m+WQ+Tey/8dsqyvJoXExHaQnlLy6KPFrfXNlcX1+J1qO/TLNhmldptMfF
/3oYvd+Kv4t/wMzusBdt39u6twF/vo9+LorJNO1HB/kwjs7rejbYNJ28reKinGCVp9zcIHp2cLSC
/XTH83xYZ0XevczyUXHZj0bFcH4Bg+5H83yUjrM8HfWij505DKKqy2xYd3ZW7PBGaUUzhQbgNyYd
nWdVVJy9TYd1NCuL9xkUiZJoXmfTrL6CiZaYPJoPs3wSQXPn0X5ZQuJFWlXJBMpeZvV5hq2ZOcfR
AaxkkkdnKfwznaajKKlwxabFZTWQbt8nZZR+SC5m0/RZlkOT0W50QV+6HUnv9HawZH1eFpd+2W6n
yNNOP+rQ4D/eu47wn61rSBoXRT86S0qqy/NLo+SseA9jKdOkxsnlsINVneTDNCrG0ituag1FpZ8o
T2CCs2SYxtgCNlSm1Xxa4yqktACX2XQanSfQcOJKjyRzWIyocWkuhvHG0dKWynQ2hQZoNrikNJr3
yXRO7dC0knyEs7TZvI5S4gwXHicrewkrkhc19kVAACOTGebzizMAXaiSlBOCHIBo2jBa7eRdGsv. Restart the application and try again
2014-12-16 19:32:19.020 OnlineBanking[14685:133123] [ERROR] [WL_DIRECT_UPDATE] -[WLDirectUpdateDownloader installUpdate] in WLDirectUpdateDownloader.m:253 :: Invalid format of file /Users/personifyvietnam/Library/Developer/CoreSimulator/Devices/1FBDD906-33B4-431E-A340-68B8BFF8F8FA/data/Containers/Data/Application/5FC1C249-9064-495C-B047-E77713D34F29/Library/tempUpdateFile. Reason is: file length prefix is not found. Reinstall the application and try again.
2014-12-16 19:32:19.030 OnlineBanking[14685:133088] [ERROR] [WL_DIRECT_UPDATE] -[WLDirectUpdatePlugin updateDidFinishWithCommand:status:] in WLDirectUpdatePlugin.m:123 :: Update did finish with error FAILURE_UNKNOWN
2014-12-16 19:32:19.062 OnlineBanking[14685:132821] THREAD WARNING: ['Notification'] took '21.096191' ms. Plugin should use a background thread.
2014-12-16 19:32:19.109 OnlineBanking[14685:132821] [DEBUG] [WL_SPLASH] -[WLSplashView hide] in WLSplashView.m:73 ::***
I config security test in authenticationConfig.xml and deploy file .war file to Worklight Server:
<customSecurityTest name="customTests">
<test realm="wl_antiXSRFRealm" step="1"/>
<test realm="wl_authenticityRealm" step="1"/>
<test realm="wl_remoteDisableRealm" step="1"/>
<test realm="wl_directUpdateRealm" mode="perSession" step="1"/>
<test realm="wl_anonymousUserRealm" isInternalUserID="true" step="1"/>
<test realm="wl_deviceNoProvisioningRealm" isInternalDeviceID="true" step="2"/>
</customSecurityTest>
Then in application-descriptor.xml:
<iphone bundleId="xxxapp.domain.com" version="0.1" applicationId="appId" securityTest="customTests">
<worklightSettings include="false"/>
<security>
<encryptWebResources enabled="false"/>
<testWebResourcesChecksum enabled="false" ignoreFileExtensions="png, jpg, jpeg, gif, mp4, mp3"/>
</security>
</iphone>
What is your Worklight full build number?
I think you should get the latest iFix for Worklight 6.2.0.01 from IBM Fix Central because this same issue "Direct Update not working when authenticity is enabled" was fixed in APAR PI26123.