簡體   English   中英

WL應該首先在IBM MobileFirst Platform 8.0上創建

[英]WL should be created first on IBM MobileFirst Platform 8.0

是否有人遇到諸如“應先創建WL”之類的錯誤?

當我的android設備和模擬器連接到MFP服務器或調用適配器時,它們引發錯誤回調。

但是,當我的瀏覽器模擬器調用適配器時,它們可以完美工作。 MFP Server版本8.0.0.00-20160803-0909 MFP CLI版本8.0.0-2016070716 Cordova版本6.3.0

這是讓我“應該首先創建WL”的部分之一

function wlCommonInit() {

  WL.App.getServerUrl(function (url) {
    alert(url);
  });

  MFPPush.initialize(
    function(success){
      //alert('--> push init success');
      MFPPush.registerNotificationsCallback(NotificationReceived);
    },
    function(failure){
      //alert('--> push init failure', failure);
    }
  )
  var NotificationReceived = function(message) {
    console.log('--> push notification received', message)
    //alert(message.alert);
  }

  WLAuthorizationManager.obtainAccessToken("push.mobileclient")
  .then(
    function (accessToken) {
      alert("Connected to MobileFirst Server");
      var options = {"phoneNumber": ""};
        MFPPush.registerDevice(
          options,
          function(success){
            //alert('--> push register success');
            var tag = ['permataMobile'];
            MFPPush.subscribe(
              tag,
              function(success){
                //alert('--> push subscribe success');
              },
              function(failure){
                //alert('--> push subscribe failure', failure);
              }
            )
          },
          function(failure){
            //alert('--> push register failure  '+ JSON.stringify(failure));
          }
        )
    },
    function (error) {
      //alert("Failed to connect to MobileFirst Server");
    }
  );
}

我遇到了類似的問題,並通過以下解決方法解決了該問題:

  1. 我的第一個應用程序無法連接到MFP服務器,但出現錯誤,應首先創建WL。 解決方法:在服務器上刪除應用程序實例,然后重新注冊該應用程序。 之后,它將在模擬器上運行。
  2. 我的第二個應用程序無法連接到MFP服務器或調用適配器。 解決方法:從頭開始創建應用程序,重新添加插件,然后重新注冊應用程序。 之后,它將在模擬器上運行。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM