Question

I'm testing Apple push notifications for our iPhone app. The app deployment target is 6.1 and the iPhone is running 7.1.1. We use Apigee as our push notification provider. The phone receives notifications when it's online via cellular and wi-fi, confirming that registration is correct on the app side and Apigee side. I turn on Airplane mode, push a notification from Apigee, wait 3 minutes, take the phone out of Airplane mode, and the phone never receives the push notification. I wait a few minutes (up to 30), then push another notification from Apigee and the phone receives the notification.

I've read Apple's Local and Push Notification Programming Guide and I've read Technical Note TN2265 Troubleshooting Push Notifications.

According to the troubleshooting guide, "Any push notification that isn't delivered immediately was queued for future redelivery because your device was not connected to the service. "Immediately" of course needs to take latency for your connection into account. Outlying cases would be beyond 60 seconds as APNs will time out at that point." This is why I wait 3 minutes. I also know that APNS queues a single message and I think I know that I'm not overwriting that message - unless latency/throughput with the APNS QoS queue is much worse than a few minutes.

In Apigee, in Message History, I see the notification that was sent when the phone was offline. It has a status of Finished with total sent: 1, total errors: 0. I also see a receipt under Data/receipts. This seems to indicate Apigee successfully sent the notification to APNS (but I'm not 100% sure). I verified that the notifierId from Apigee is the same for all notifications sent when online and offline.

Is there any technique I can use to see why the notification is not being delivered from APNS? Is there anything else I can check?

Was it helpful?

Solution

You are correct, if the Notification is showing no errors and a Receipt has been created, the message was properly delivered to APNS.

The only thing I can think of outside of any vagaries of APNS itself that can affect your delivery is if you set the "expire" property on your Notification. Have you tried to see if that makes any difference to your result?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top