在XCode6.4上编译时,我开始在xib文件中遇到编译错误:
function wlCommonInit(){
angular.element(document).ready(function() {
// Boot up
angular.bootstrap(document, ["myMobile"]);
});
WL.Client.connect({onSuccess: connectSuccess, onFailure: connectFailure});
}
function connectSuccess() {
WL.Logger.debug ("Successfully connected to MobileFirst Server.");
}
function connectFailure() {
WL.Logger.debug ("Failed connecting to MobileFirst Server.");
//1st snippet
WL.SimpleDialog.show("Push Notifications", "Failed connecting to MobileFirst Server. Try again later.",
[{
text : 'Reload',
handler : WL.Client.reloadapp
},
{
text: 'Close',
handler : function() {}
}]
);
}
//2nd snippet. For the 3rd one copy the adapter
//------------------------------- Handle received notification ---------------------------------------
WL.Client.Push.onMessage = function (props, payload) {
WL.SimpleDialog.show("Tag Notifications", "Provider notification data: " + JSON.stringify(props), [ {
text : 'Close',
handler : function() {
WL.SimpleDialog.show("Brodcast Notifications", "Application notification data: " + JSON.stringify(payload), [ {
text : 'Close',
handler : function() {}
}]);
}
}]);
};
我试过了: