在我的app.js of ionic app中我有这个代码
angular.module('starter', ['ionic','starter.controllers','btford.socket-io'])
.run(function($ionicPlatform, $http,config) {
$ionicPlatform.ready(function() {
if (window.cordova && window.cordova.plugins.Keyboard) {
cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
cordova.plugins.Keyboard.disableScroll(true);
}
if (window.StatusBar) {
StatusBar.styleDefault();
}
var push = new Ionic.Push({
"debug": true
});
push.register(function(token) {
push.saveToken(token); // persist the token in the Ionic Platform
});
});
})
我推动离子推送终点,我得到的反应似乎没问题,看起来像http://pastebin.com/SjVicY4J
但我的设备从未收到通知。那太奇怪了。我不知道出了什么问题。