首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Pushwoosh IOS phonegapp代码集成

Pushwoosh IOS phonegapp代码集成
EN

Stack Overflow用户
提问于 2013-02-13 20:44:29
回答 1查看 375关注 0票数 0

你好,我目前正在开发我的ios pushwoosh手机应用程序。我正在关注这个guide

我不知道我需要在哪里实现此代码:

代码语言:javascript
复制
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');
},

还有这段代码是不是我需要放在同一个文件里?接收推送通知。请参阅以下initPushwoosh函数中的代码片段

代码语言:javascript
复制
document.addEventListener('push-notification', function(event) {
var notification = event.notification;
navigator.notification.alert(notification.aps.alert);
pushNotification.setApplicationIconBadgeNumber(0);
}); 
EN

回答 1

Stack Overflow用户

发布于 2013-02-25 23:49:56

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14853871

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档