IBM Worklight 6.0 - WL.Client.reloadApp() not working in Windows Phone 8

后端 未结 2 1607
栀梦
栀梦 2021-01-28 22:39

We are using Worklight 6.0.0 enterprise edition and currently building hybrid apps for android, BB, Windows Phone 8 and iOS.

We are currently getting the below error whe

2条回答
  •  自闭症患者
    2021-01-28 23:21

    Looking at the edited comments and question, the problem could be at the path used.

    Take a look at the multi-page sample project provided in the IBM Worklight Getting Started webpage. It contains special handling for WP8 which you may need to apply to your logout function as well.

    Building a multi-page application training module
    Multi-page sample project

    • See slides 8 and 9
    • Slide 8 talks about the implementation change below
    • Slide 9 talks about a change you must perform in jQuery Mobile's JS in order to make page navigation work.
    • Since you are using jQuery Mobile, take a look at this question and its answer: IBM Worklight v 5.0.6 - Can't navigate multipages on Windows Phone 7.5 environment

    Note how the path is handled specifically for Windows Phone 8.
    common\main.js:

    var path = "";
    
    function wlCommonInit(){
        // Special case for Windows Phone 8 only.
        if (WL.Client.getEnvironment() == WL.Environment.WINDOWS_PHONE_8) {
            path = "/www/default/";
        }
       ...
       ...
    }
    

    You need to now do one of two things:

    • account for the path for WP8
    • alter jQuery Mobile's JS if you use that

提交回复
热议问题