Push notifications not working after generating ne

2019-08-05 05:25发布

问题:

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!!