MobileFirst入门 - 在生产模式Bluemix推送通知失败 [英] MobileFirst Starter - Bluemix Push Notification failure in Production mode

查看:529
本文介绍了MobileFirst入门 - 在生产模式Bluemix推送通知失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我建立一个iOS应用程序,可以通过Bluemix接收远程通知。我在X code中的应用程序捆绑标识符匹配的AppId苹果门户网站也符合APN证书(XXX-sandbox.p12和XXX-production.p12)。

I am building an iOS app that can receive remote notification through Bluemix. I have the app Bundle Identifier in Xcode matches the AppId in Apple Portal which also match the APN certificate (xxx-sandbox.p12 and xxx-production.p12).

在开发过程中我一直在使用推送通知与Bluemix沙盒(下MobileFirst入门样板)进行测试。所有工作的罚款。我可以在我的iPhone收到通知。然而,当我在生产模式下进行测试,我不断收到错误信息:内部服务器错误找不到设备

During development I have tested using Push Notification with Bluemix Sandbox (under MobileFirst Starter boilerplate). All work fine. I can receive notification in my iPhone. However when I tested in Production mode, I keep getting error messages: "Internal server error. No devices found".

我已经证实了我的设备(使用REST API存在:的https://mobile.ng.bluemix.net/imfpushrestapidocs/#!/devices/get_apps_applicationId_devices).

I have confirmed that my device exists (using REST API: https://mobile.ng.bluemix.net/imfpushrestapidocs/#!/devices/get_apps_applicationId_devices).

任何建议是极大的AP preciated。

Any suggestion is greatly appreciated.

推荐答案

好吧REST的API是表明你还没有注册的生产模式中的任何设备。此外,据显示,后端应用程序在沙盒模式下工作,所以让我们改变,第一。

Alright the REST API is showing that you have not registered any devices in production mode. Furthermore it is showing that the backend application is working in Sandbox mode, so let's change that first.

要做到这一点,你会希望PUT的applicationID设置REST API调用:

To do so you'll want the PUT ApplicationID Settings REST API call:

<一个href=\"https://mobile.ng.bluemix.net/imfpushrestapidocs/#!/applications/put_apps_applicationId_settings\" rel=\"nofollow\">https://mobile.ng.bluemix.net/imfpushrestapidocs/#!/applications/put_apps_applicationId_settings

随着身体的JSON

{ 
  "mode" : "PRODUCTION" 
}

我会再使用GET的applicationID设置REST API调用,以确认已发生的模式开关(你应该看到模式:在响应生产)

I would then use the GET ApplicationID Settings REST API call to confirm that the mode switch has occurred (you should see "mode" : "PRODUCTION" in the response)

<一个href=\"https://mobile.ng.bluemix.net/imfpushrestapidocs/#!/applications/get_apps_applicationId_settings\" rel=\"nofollow\">https://mobile.ng.bluemix.net/imfpushrestapidocs/#!/applications/get_apps_applicationId_settings

一旦环境模式已切换,您将需要重新运行客户端code的生产模式,以注册您的设备。从那里,你应该能够推动像您期望的。

Once the environment mode has been switched you will need to re-run your client code to register your device in production mode. From there you should be able to push as you expect.

这篇关于MobileFirst入门 - 在生产模式Bluemix推送通知失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆