我正在使用 IBM Worklight 6.0.0 并在 iOS 7 模拟器上进行测试。
我有以下 JavaScript 错误。每次登录时都会出现。
Error while trying to retrieve device token from the mobile operating system.
(anonymous function) cordova.js:5312
__log worklight.js:1292
(anonymous function) worklight.js:1377
__updateTokenCallbackError wlgap.ios.js:403
在客户端,我的代码是:
if (WL.Client.Push){
WL.Client.Push.onReadyToSubscribe = function(){
WL.Logger.debug("onReadyToSubscribe");
if (isPushSubscribed() == false) {
doSubscribe();
}
};
}
if (WL.Client.Push){
WL.Client.Push.registerEventSourceCallback(
"myPush",
"PushAdapter",
"PushEventSource",
pushNotificationReceived);
}
我怎样才能避免这个错误?