Push notifications stopped being delivered to some devices

Hello all,


We have an issue with push notifications that we have been trying to solve for a month now - unsuccessfully. The problem is that push notifications have stopped working (delivery of notifications to devices) in production sometime during the first week of May to some devices.


Our servers do not receive any error codes when pushing payloads to the APNS so we do not know the exact point in time when this started to happen. Also, there are no tokens returned by the feedback server.


Anyway, to take it from the beginning, these are the steps we have done so far since the issue was reported:

1) Checked logs

- payloads are pushed without errors

- feedback server returns no failed device tokens

2) Developer portal -> checked expired certificates

- production certificate there was valid (still 1 month before expiration) but we have generated a new one anyway

3) Isolated a push token from database and tried to push from terminal

- confirmed step 1)

4) Reinstalled the application and isolated its token from database

- payload pushed without errors

- notification delivered successfully

None of the above has solved our issue.


Other information and notes:

- we are still using certificates, not JWT token for authorization

- there has been no app update prior to this notification issue that could break something

- enabling/disabling notifications in device Settings does not help

- restarting a device does not help

- the device has the latest software iOS 11.4

- the reason why notifications stopped coming is still unknown (the first week in May)


The interesting (and frustrating) thing is that push notifications are not delivered to devices that had the application installed (from the App Store) before the date that notifications stopped coming. If a user reinstalls the application (again, from the App Store), notifications are delivered correctly without any issues.


Since it is not a good user experience to force users to reinstall or to update their application (and there really is no way to do this anyway), we have reached a dead-end.


Since everything is working fine for newly installed or reinstalled application, we have come to a conclusion that there may be a problem with device tokens but again there is no way how to force a token refresh so that iOS devices would receive fresh ones from APNS.


Is there perhaps a way how to force APNS to give a device a new token? Or are we missing something?

Or, will an application update cause a push token refresh?

Does calling `UnregisterForRemoteNotifications` and `RegisterForRemoteNotifications` in production environment always generate a new push token?


Thank you all in advance for any information regarding this issue and we will provide any additional information if needed.

Replies

Hello, eMan_cz,


Did you ever get a resolution to this? I am seeing the same behavior with some users.


Thanks!

Hello.


I have a quite similar (very realted) issue.

Here it is https://forums.developer.apple.com/thread/117022


I really apreciate any help.


Regards

Hello eMan_cz,


I hope with all my heart that you and your family are well. I am writing to you because I have an application in which we have the problem you had two years ago, it started to happen to us three days ago, we have already reviewed everything you comment on in your post, but we have not been able to solve it. I was wondering if you were lucky with your problem, could you share the solution with me?

Hi, I've just had this issue today. I managed to fix it by changing the APS Environment in Entitlements.plist to production.

It turns out Xcode does not do this automatically according to the provisioning profile.

Hi,

We are facing a similar issue. Do you guys have any solution for this issue?

Thanks, Ashish Jha