[英]Bluemix Push Service Error while registering device in Cordova App
I'm trying to integrate Bluemix Push Notification Service in Cordova app using Cordova plugin. 我正在尝试使用Cordova插件将Bluemix Push Notification Service集成到Cordova应用程序中。 Following this http://mbaas-gettingstarted.ng.bluemix.net/hybrid#push-operations .
遵循此http://mbaas-gettingstarted.ng.bluemix.net/hybrid#push-operations 。 However, I'm facing the following error when I register device as follows,
但是,我在注册设备时遇到以下错误,
var push = IBMPush.getService();
var alertNotification = function(message) {
IBMBluemix.getLogger().info("Received notification");
console.log(JSON.stringify(message));
}
//Register the device
push.registerDevice("MyDeviceName", "UserName", "alertNotification").done(function(response) {
console.log("device registration done successfully with response : ", response);
}, function(err) {
console.log("ERROR in device registration : ", err);
});
ERROR in device registration : Status Code : 403, Status Line : Forbidden 设备注册错误:状态代码:403,状态行:禁止
Any help is appreciated! 任何帮助表示赞赏!
Our new Bluemix Mobile Services Hybrid SDK has been released which works with the latest version of Cordova. 我们已经发布了新的Bluemix移动服务混合SDK,可与最新版本的Cordova一起使用。 Following this the old "mbaas" Cordova SDK has been deprecated in favor of the new and improved version.
在此之后,不赞成使用旧的“ mbaas” Cordova SDK,而是使用新的改进版本。
You can find the new open source cordova plugins on our Github at https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-cordova-plugin-core and https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-cordova-plugin-push 您可以在我们的Github上找到新的开源cordova插件,网址为https://github.com/ibm-bluemix-mobile-services/bms-clientsdk-cordova-plugin-core和https://github.com/ibm-bluemix -mobile-services / bms-clientsdk-cordova-plugin-push
For utilizing push I would recommend taking a look at our HelloPush Cordova sample and running through the README found there, do note that you will need to create a new backend with the new services to properly utilize the new SDK. 对于利用推,我建议您看一下我们的HelloPush Cordova示例,并运行在那里找到的自述文件,请注意,您将需要使用新服务创建一个新后端以正确利用新SDK。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.