Push notifications not working after generating new certificate

和自甴很熟 提交于 2019-12-12 23:34:14

问题


My app was configured to use push notifications and was working fine. My certificate expired and another of the team members created a new cert and sent me the p12 file to use. Got the certificate and updated the mobileprovision to use this new certificate.

I also regenerated the pem files for push notification. But now my push notifications don't work.

I tried generating the pem files twice already but apns wouldn't work.

Can someone let me know what the issue could be?

Thanks.


回答1:


Take in mind that if there is an invalid deviceToken sent when sending notifications, Apple will silently drop every message sent. So I guess that the problem may be that you have invalid deviceToken (probably from previous cert) that are being sent with your current cert. Are you registering with the Feedback service?




回答2:


  1. Perform a soft-reset of the device
  2. Turned off push notifications on the device and turned them on again
  3. Turned off push notifications for the app and turned them on again in the settings

Not sure what part made the difference but push notifications work again!! Yay!!



来源:https://stackoverflow.com/questions/6262246/push-notifications-not-working-after-generating-new-certificate

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