How to find the Apple Push Notification Delivered to user or not from our server?
Asked Answered
P

3

7

Am new to Apple Push Notification services in iPhone app. I have learned these tutorials and apple document,

  • www.raywenderlich.com/3443/apple-push-notification-services-tutorial-part-12
  • www.raywenderlich.com/3525/apple-push-notification-services-tutorial-part-2

We are pushing a notification from our server (PHP) to Apple Push Notification Server and APNS will push the notification to devices. In this case how we can know the notification has delivered the user successfully or not from our server? If we send notification to all subscribed users (above 100 users) can we have a delivery report for those 100 users?

Plain answered 8/5, 2012 at 5:40 Comment(0)
I
14

APNS does not tell you if a message is successfully delivered. The closest you can get is poll its Feedback Service to see if your app is uninstalled from a device. Check out this SO post for an idea how: PHP technique to query the APNs Feedback Server

What you can do is have your iOS app record something whenever a push notification arrives with application:didReceiveRemoteNotification but that only works if your app is running in the foreground.

Inferior answered 8/5, 2012 at 5:47 Comment(3)
Hello Janson Wang. Thanks for your answer. I have one more doubt on Apple Push Notification can you please help on this. Please see my edited question. Thanks.Plain
Please see this question : #10494449Plain
So is there a way to ensure that the server has actually notified the client using APNS ? If I have new data on the server that I need the client to have too, how can I ensure that the client gets it ? Given that APSN does not guarantee delivery, how could this be done?Agan
M
4

The Local and push notification guide says :

The delivery of notifications is “best effort” and is not guaranteed.

However there exists a feedback service described in the doc as:

Apple Push Notification Service includes a feedback service that APNs continually updates with a per-application list of devices for which there were failed-delivery attempts

Marj answered 8/5, 2012 at 5:48 Comment(4)
Hello Vin. Thanks for your answer. I have one more doubt on Apple Push Notification can you please help on this. Please see my edited question. Thanks.Plain
should be posted as a separate questionMarj
Please see this question : #10494449Plain
@Marj link is not working :( ...Semaphore
G
1

✅ It's possible from 2023

Apple introduced Push Notification Console in 2023 with a bunch of features and APIs. One of them is Access delivery logs which you can get the different states of a notification by giving the apns-unique-id.

Monitor Delivery Metrics

With this feature, you can even find out why it is not delivered in some cases (for example when the Low Power mode is on). All delivery logs (including console and API) are available in the Delivery Log tab of the console:

Console Demo

This feature is available for notifications sent through regular APNs API as well. You need to record “apns-unique-id” from APNs response to be able to query this information.

⚠️ Note that for the notifications sent from the Console, there’s no need to switch to the “delivery log” tab, the same information is available on the Send page itself:

Console Demo 2

Geaghan answered 25/12, 2023 at 8:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.