J.Kennedy
J.Kennedy

Reputation: 41

Azure Notification hub wont send apple push notifications

I was following this tutorial for setting up push notifications: https://learn.microsoft.com/en-us/azure/developer/mobile-apps/notification-hubs-backend-service-react-native#create-an-aspnet-core-web-api-backend-application

This was previously working and sending notifications to my phone through the notification controller. Since then it has stopped working. I can see that my device is registered in the notification hub and when I send a notification I get a 200 response from the server, so there are no exceptions happening. However the push notification is never sent to my phone. However, if I send a test notification from azure portal, the notification is sent to my phone immediately.

Why would the notification fail to send when using the notificationHub.SendAppleNativeNotificationAsync, but successfully send when sending a test from Azure portal?

Upvotes: 0

Views: 460

Answers (1)

J.Kennedy
J.Kennedy

Reputation: 41

I'm posting an answer to my own question. When the notifications first stopped working, there were no messages being sent to apple's apns. I'm not sure why, there must have been something wrong with the device registrations. I created a new notification hub and this problem was fixed, but then I was trying to send notifications which were too big so apns just dropped them. I reformatted by notification structure and now they are being sent correctly.

Upvotes: 0

Related Questions