我正在嘗試使用official documentation將推送通知導入到Ionic 2應用程序中。在Ionic 2中使用Push
我已經包括了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
是否還有其他我需要做的或者是否還沒有可能在Push Ionic 2應用程序中使用Push?
感謝您的任何幫助。
我剛剛根據https://github.com/phonegap/phonegap-plugin-push文檔在最後使用了PushNotification。 –
你是如何實現推送通知你可以給一些解釋或一步一步的過程來做到這一點 –