ios - 移动设备优先 - 无法为推送通知注册设备

标签 ios cordova amazon-web-services push-notification ibm-mobilefirst

我似乎无法在为推送通知托管的远程服务器 (MobileFirst Platform Server) 上注册我的 iOS 设备。

这是我注册设备的代码

MFPPush.registerDevice(
  {},function(successResponse) {

  },
  function(failureResponse) {
    alert("Failed to register "+failureResponse);

});

我总是收到失败响应

"Error Domain=com.ibm.mfp.push Code=5 \"Request failed: internal server error (500)\" UserInfo={com.alamofire.serialization.response.error.response=<NSHTTPURLResponse: 0x156663e80> { URL: http://<server-ip:port>/imfpush/v1/apps/<app-bundleidentifier>/devices/FFF2867D-D43A-4FC0-A9C7-CBECF26BFFD6 } { status code: 500, headers {
  Connection = Close;
  \"Content-Length\" = 0;
  \"Content-Type\" = \"application/json\";
  Date = \"Mon, 20 Mar 2017 03:57:45 GMT\";
  \"X-Powered-By\" = \"Servlet/3.0\";
}}, NSErrorFailingURLKey=http://<server-ip:port>/imfpush/v1/apps/<app-bundleidentifier>/devices/FFF2867D-D43A-4FC0-A9C7-CBECF26BFFD6, com.alamofire.serialization.response.error.data=<>, NSLocalizedDescription=Request failed: internal server error (500)}"

其他信息:

  1. 我的服务器 IP 是 http://52 ..:9080
  2. 我已经设置了带有自定义安全检查的“push.mobileclient”范围,我还在 secret 客户端设置了“push.application.app-bundleidentifier”和“messages.write”
  3. 我也为 MobileFirst 服务器的应用程序上传了 apns-certificate-sandbox.p12 证书
  4. 当我在本地主机上注册时注册成功。

希望提供的数据足够。

提前致谢

最佳答案

我已设法通过将服务器和客户端移动优先平台版本更新为同一版本来解决此问题。

关于ios - 移动设备优先 - 无法为推送通知注册设备,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42895797/

相关文章:

ios - UILabel 不显示任何消息

iOS : How to create view which is top of all screen

ios - segue 不使用 UITableViewCell alloc,但 dequeueReusableCellWithIdentifier

javascript - Cordova 混合应用程序 - HTTP 请求非常慢

android - 如何配置/platforms/android/assets下的 "file.list"走正确的路径?

ios - UICollectionViewCell 中圆形 UIImageView 的错误

html - 如何在 cordova 应用程序中添加页面

python - 如何在python中异步发送SQS消息?

amazon-web-services - 在 ubuntu 中使用 cloudwatch 日志代理将服务器日志上传到 aws cloudwatch 日志

amazon-web-services - 如何获取云组建模板中指定的ECS实例id?