2013-02-13 67 views
0

你好,我目前正在研究我的ios pushwoosh phonegapp應用程序。我下面這個guidePushwoosh IOS phonegapp代碼集成

我不知道,我需要實現此代碼:

In your onDeviceReady function add: 
initPushwoosh(); 

bind: function() { 
document.addEventListener('deviceready', this.deviceready, false); 
}, 
deviceready: function() { 
// note that this is an event handler so the scope is that of the event 
// so we need to call app.report(), and not this.report() 
initPushwoosh(); 

app.report('deviceready'); 
}, 

,也驗證碼DOS我需要放置在同一個文件? 接收推送通知。見代碼initPushwoosh功能

document.addEventListener('push-notification', function(event) { 
var notification = event.notification; 
navigator.notification.alert(notification.aps.alert); 
pushNotification.setApplicationIconBadgeNumber(0); 
}); 

回答