【发布时间】:2016-03-01 12:08:18
【问题描述】:
我正在尝试使用 official documentation 在 Ionic 2 应用程序中实现推送通知。
我已经包含了phonegap-plugin-push 插件,但是当我插入它们给你的代码时(包装在一个平台就绪函数中),就像这样:
this.platform.ready().then(() => {
var push = Push.init({
android: {
senderID: "12345679"
},
ios: {
alert: "true",
badge: true,
sound: 'false'
},
windows: {}
});
});
我刚刚收到以下错误:
ORIGINAL EXCEPTION: ReferenceError: Push is not defined
我还有什么需要做的吗?还是不能在 Ionic 2 应用程序中使用 Push?
感谢您的帮助。
【问题讨论】:
-
我只是按照github.com/phonegap/phonegap-plugin-push docs 最后使用了 PushNotification。
-
你是如何获得推送通知的,你能给出一些解释或一步一步的过程来做到这一点
标签: push-notification ionic-framework ionic2