iOS: APNS connection closed error for push notifications

Gateway issues for development sandbox builds

APNS connection is closed. We cannot count the exact number of delivered pushes.

This usually happens when testing an ad-hoc/enterprise build of the iOS App to test if notifications are working. The most likely cause is that your notification was sent via the wrong gateway due to a misconfiguration.

Apple has two notification gateways: one for sending to dev builds (sandbox) and the other for sending to production builds. To test with a production build you will need to have a production push notification cert uploaded. Navigate to Settings > Apps & sites > click on the matching iOS app > Push Settings. From this page, your iOS cert can be uploaded/re-uploaded as appropriate.

For help on generating iOS certificates, see iOS push notifications.