Azure push-notification hub don't work after failure

大城市里の小女人 提交于 2019-12-25 01:44:24

问题


On the server side, we are using Azure with SDK Azure Tools Version: 2.2

We send push-notifications on iOS with a failure (APNS Errors did appear in Dashboard). After this failure, push-notifications don't work on this tag and hub all the time. How can we fix this situation without clearing all registrations and creating a new tag?

Usually scenario looks like this: 1. Tag works fine. 2. We register some device with wrong certificate for example. Errors in dashboard. 3. Tag doesn't work totally. Errors in dashboard. Devices which previously got notifications doesn't get it now.

Can we change something to make old(added before step 2) devices able to get notifications?


回答1:


Notification Hub is very sensitive to APNS certificates/tokens. There are couple rules:

  1. Avoid to use invalid (fake) device tokens or clean them up before send to real devices. If it is required to run some unit tests with fake tokens then it is better to create separate hub for such purpose.

  2. When it is time to switch from the sandbox APNS certificate/endpoint to the production one (or back) it is required to clean up ALL existing APNS registrations. Or even better way - just create separate hubs for test and for production.



来源:https://stackoverflow.com/questions/27445227/azure-push-notification-hub-dont-work-after-failure

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