Bluemix Push Notification service not working anymore?

柔情痞子 提交于 2019-12-12 18:15:46

问题


I have a native iOS Swift app talking to a Node.js Bluemix backend with MobileFirst services (AMA, Cloudant, Push iOS 8), which worked well for over a month. A few days ago I noticed that I could no longer register new devices from the iOS app (IMFPushClient.sharedInstance().registerDeviceToken() responded with a 404).

I knew that changes had been made recently to the MobileFirst services (e.g. the various push services were merged into one), so I figured I should rebind those services. This resolved the registration issue, but I haven't been able to receive push notifications ever since.

This is what I tried:

  • created a completely new backend with the "MobileFirst Services Starter" boilerplate
  • cloned the most recent version of the "Bluelist" sample app and configured it for this new backend
  • issued a new APNs certificate for my bundle ID and uploaded it to the push service
  • successfully registered for push notifications on my device. I have verified this by calling the /devices REST API (essentially, I followed these steps).

Now every time I use the REST API to send messages (after figuring out that the bearer token approach was replaced with a new "appSecret" header), I get an HTTP 202, but the notification never arrives. Likewise, when I try to send the message through the service's dashboard, I get a success message, but the notification never arrives.

One thing I noted is that the symptoms stay the same even if I don't provide the .p12 certificate to the service, so I wonder if this might be some certificate issue, but I have no idea how to trace this. Also, IIRC the "old" MobileFirst services required me to provide the bundle ID and version of the mobile app, but this seems to be gone now. Any help is greatly appreciated.


回答1:


We were able to solve the issue above by making sure the sandbox environment was using a sandbox .p12 file. To verify this setting go to the IBM Push Notification Dashboard and click the Configuration tab:

Here you can see the Certificate Type of the .p12 file you have uploaded. Make sure if you are using the Sandbox environment it is listed as Sandbox. Same is true for the Production environment.



来源:https://stackoverflow.com/questions/33013796/bluemix-push-notification-service-not-working-anymore

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!