Cordova 爱奥尼亚和科多瓦普什
我是新来的:D 我有下一个代码:Cordova 爱奥尼亚和科多瓦普什,cordova,ionic-framework,push,Cordova,Ionic Framework,Push,我是新来的:D 我有下一个代码: alert('hi'); $cordovaPush.register(config).then(function (result) { alert('push' + result); }, function (err) { alert('error); }); alert('bye'); 当我进入爱奥尼亚视图时,我会收到提示:“嗨”和“再见”,但从来没有“推送”或“错误” 我安装: ionic plugin add https://github.co
alert('hi');
$cordovaPush.register(config).then(function (result) {
alert('push' + result);
}, function (err) {
alert('error);
});
alert('bye');
当我进入爱奥尼亚视图时,我会收到提示:“嗨”和“再见”,但从来没有“推送”或“错误”
我安装:
ionic plugin add https://github.com/phonegap-build/PushPlugin
我把ng-cordova.js和PushNotification.js放在索引中
发生了什么事
谢谢 查看插件对您来说很容易。
例如:
var androidConfig = {
"senderID": "xxxxxxxxxxxx",
};
$ionicPlatform.ready(function() {
$cordovaPush.register(androidConfig).then(function(result) {
console.log(result);
}, function(err) {
console.log(err);
})
});
以上代码添加到app.js文件中。祝你好运。我认为你的代码不对 像这样检查错误
alert('hi');
$cordovaPush.register(config)
.then(function (result) {
alert('push' + result);
})
.fail(function (err){
alert(err);
})
alert('bye');
我查看和复制粘贴,得到了相同的结果…什么都没有,我试了又试,什么都没有。我得到Ripple,它说“推送通知未定义”。。。也许Devicerady不起作用了:sYup,起作用了。在我得到“PushNotification…init”之后,我得到了“PushNotification未定义”。所以,我对DeviceRady有问题我想这对我来说是可行的,你的发件人是对的,我正在尝试使用iosConfig(与Cordova页面相同),并使用Ionic View、Browser、Ripple、iOS Simulate和Run进行了测试。。。什么也没有