Azure notification hub with ios 13

ldywicki 0 Reputation points
2024-04-03T09:47:53.3233333+00:00

Hello,

I need an advice on troubleshooting of azure notification hub. I have inherited an application which uses this API to dispatch notifications to mobile app on two platforms (ios, android). The ios notifications do not work with ios 13, which is described in several places (https://learn.microsoft.com/en-us/azure/notification-hubs/push-notification-updates-ios-13, https://github.com/Azure/azure-notificationhubs-java-backend/issues/48).

Still, when I adjust my code to include apns-push-type and apns-priority headers my notification does not reach device. Does anyone know anything about that? I am sure that device I am testing with is valid, cause I was able to use its registration to dispatch test push notification using Apple infrastructure.

To make issue even more mysterious - the hub statistics do not indicate any issues with authentication towards APNS. Since I am on free tier (its really small app), I do not have a full telemetry and have to use what I have. Sending using azure console (for the specific tag) leaves me with message Successfully sent test message.  Outcome: {0 passed, 0 failed}.  Please see result section for details. What does it mean? Programmable sender I did receives HTTP 201 code after send. It reports no errors, but this status is not explained in official docs: https://learn.microsoft.com/en-us/rest/api/notificationhubs/send-apns-native-notification.

In terms of history - while debugging issue I've made a journey from token to certificate authentication and back. So now I am on the token auth which should be fine. I can't drop hub, as it has some registrations and been in use since several years.
Same hub works with older ios (on iphone 6), it doesn't work with new operating system.

Before diving into more details, thank you in advance for your help! :-)

Azure Notification Hubs
Azure Notification Hubs
An Azure service that is used to send push notifications to all major platforms from the cloud or on-premises environments.
325 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ldywicki 0 Reputation points
    2024-04-03T12:31:55.3933333+00:00

    Diving more into issue I've found that registrations for new ios version have two "tags" while old one had just an uuid. When I use uuid format (value of the $UserId) then my notifications do not pass. If I use full format $UserId: xyz, they are dispatched properly. Kind of surprising.

    Now I face situation where my app collected registrations with old format, and knows only uuid. The $UserId and $InstallationId are unknown to it, more over I don't really know (and do not want to deal with) device os version.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.