0

We want to send an acknoledge message to our server to ensure that users received a certain push message. For Android this is really simple because we can infercept the GCM push with a 'broadcastlistener' but for ios I cannot find how to do this and if it is possible.

We do not need to stick with ios push, but we do prefer it. So any answer that suggests a workaround is also fine.

To make it more clear: we know apple does not guarantee delivery and sends no acknoledge by themselves. That is why we want the app to send an acknoledge, but how does the app know when the push arrives when the app is not active.

Thanks in advance.

edit: It seems from the answers and our own research that what we want is not possible using the APNS. Does any one know a workaround if it is possible at all to send a message to the app when the app state is killed and we want to receive and acknoledge the message?

Niki van Stein
  • 10,564
  • 3
  • 29
  • 62

2 Answers2

1

Your best bet is to use a 'silent' push notification via the content-available key in the push payload - Described here

As long as your app is running (in the foreground or background) your push notification message will be delivered to your app's delegate object. In this method you can send an acknowledgement back to your server and also display a local notification to alert the user if desired.

I say this is your "best bet", because unfortunately if your app isn't running in the foreground or background then the notification isn't delivered to your app, it is simply displayed like a standard notification. There is no 100% way to know that an Apple push notification was delivered to the device.

Paulw11
  • 108,386
  • 14
  • 159
  • 186
-1

Yes, it is possible in iOS, I found one workaround. Please refer my answer from below link, Apple push notifications - delivery receipt

  • A link to a solution is welcome, but please ensure your answer is useful without it: [add context around the link](https://meta.stackexchange.com/a/8259) so your fellow users will have some idea what it is and why it’s there, then quote the most relevant part of the page you're linking to in case the target page is unavailable. Answers that are little more than a link may be deleted. – R Balasubramanian Aug 01 '18 at 18:23