Since my upgrade to WL 6.2 direct update isn't working anymore on iOS. What I'm trying to achieve is to get direct update working with the iPad and my windows machine. This way I can develop on my windows machine and use direct update to push my changes to the iPad (iOS 7.1.2). Following scenario describes my problem.
Create a new WL project in worklight studio on Mac (just installed the latest WL plugin today (platformVersion=6.2.0.00.20140724-2139). Add iOS as environment and replace the main.js with the following code:
function wlCommonInit(){
WL.Client.connect({
onSuccess: onConnectSuccess,
onFailure: onConnectFailure
});
}
function onConnectSuccess() {
WL.Logger.debug("Connect success.");
}
function onConnectFailure() {
WL.Logger.debug("Connect failed.");
}
Run the project as an Xcode project and use Xcode to deploy the application to an iPad. Now follow the following steps to reproduce the issue:
- Make a modification in the index.html
- Redeploy the app on your local worklight server in eclipse
- Kill your app and restart it again
- The direct update is working and your changes are reflected in your app. Yeah!
Now as a very basic next step, try to use the direct update with a Custom Server URL. Thick the Use custom URL checkbox in your iPad settings and change the Custom server URL to the URL of your local server.
Change Server Connectivity Settings http://i59.tinypic.com/35831xx.png
When I now retry step 1 to 3, the direct update fails. On startup the app informs me an update is available, and when I click update the downloading progress bar appears but stays at 0% forever. In the custom server URL I only changed the IP to the IP of my macbook and removed the dash after the project name. I also tried changing the URL to the URL of my windows development machine (also with the latest WL eclipse plugin), but this results in the same behaviour.
One last remark; I would expect that when I disable the Use custom URL checkbox; direct update would work again. But this is not the case.