3

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?

Davey Johnson
  • 335
  • 1
  • 2
  • 7

1 Answers1

1

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?

Scott Ganyo
  • 311
  • 3
  • 4
  • Thank you Scott. It may take me a while to verify this because I'm working in a restrictive environment - I didn't want your answer to go unacknowledged. I missed this property in the documentation and I have a feeling this is going to solve the issue. I'll update when I can. – Davey Johnson Jun 05 '14 at 14:17
  • 2
    I confirmed that setting the expire property solves the problem. It would be awesome if Apigee documented the behavior of not setting it - granted there's a grey area there between the Apigee & APNS boundaries. We're currently using Apigee's admin portal to send notifications and the expire flag is not supported (but that's our problem). Thanks again Scott. – Davey Johnson Jun 09 '14 at 20:20
  • Thanks for the analysis and feedback, Davey! – Scott Ganyo Jun 10 '14 at 20:20