Search code examples
notificationspushios13

Push notifications stopped being received in iOS 13


I'm using Azure Notification Hub and have a cordova based application . Everything works fine for iOS < 13. For iOS 13 I started experiencing some strange behaviors. - When using sandbox all is fine - when using production only first few messages are received. Then the users don't get any notifications. If they relog to app then they can have notifications for some time.

Tried bodies with:

{ "aps": { "alert": "notification message" }}

or

{"aps": { "alert": { "title":"test", "body":"notification message" }}}

I'm adding headers:

{ "content-available", "0"},
{"apns-push-type", "alert" },
{ "apns-priority", "10" }

Solution

  • I had similar problem. Since introduction of iOS 13 I found that you have to make sure your push object is being registered each time you resume the app. The subscription is closed by iOS if it's not reinitialized when resuming the application.