push notifications not working

2019-08-30 19:34发布

问题:

I know this question has already been asked but I am in urgent need of the answer.

I was implementing push notifications in my app. Initially everything was working fine and I was getting alerts. But one day my certificate expired and I renewed the cert and used the updated p12 file.

I regenerated the pem files. But now I stopped getting alerts.

I thought that may be I there could be some issue with p12 files so I regenerated them several times. But push notifications don't work.

Please suggest something to resolve this issue. Thanx in advance.

回答1:

May be the ports for sending the push notification are closed on your machine. Check with the ports specified in apple push notification guide.



回答2:

I got the solution for my problem.

According to apple docs sometimes due to impersistent connection the device is not able to connect with APNS. So for this you need to on-off Notifications from the Settings app frequently so that the connection is regained with APNS.

Hope this saves a lot of time of many people stuck in this issue.