Prompt
why are my iPhone push notifications failing through APNs
Latest observation
Oct 14, 2026
OpenAI APIWeb search: off
APNs failures can come from a few common places. The fastest way to narrow it down is to determine where the rejection/timeout occurs:
1) Check the APNs response
When you send to APNs, look at the HTTP/2 response:
- 200 = APNs accepted the request
- 4xx/5xx = APNs rejected it or had an issue
- If you get a 400-series error, the response body usually tells you why
Common APNs error reasons:
BadDeviceToken— token is wrong, expired, or for the wrong environment (sandbox vs production)DeviceTokenNotForTopic— bundle ID / topic mismatchTopicDisallowed— your certificate/key isn’t allowed for that appInvalidProviderToken— JWT auth key is bad, expired, wrong team ID / key IDUnregistered— app was deleted or push permission/token is no longer validPayloadTooLarge— notification payload exceeds APNs limitTooManyRequests— rate limited
2) Make sure sandbox vs production matches
This is a very common issue:
- Debug builds / development provisioning usually use sandbox
- TestFlight / App Store / production builds use production
If you send a sandbox token to the production APNs endpoint (or vice versa), it will fail.
3) Confirm your auth setup
Depending on how you authenticate:
- JWT token (.p8 key):
- correct Team ID
- correct Key ID
- token signed with ES256
- JWT is not stale/incorrectly generated
- Certificate-based auth:
- certificate not expired
- certificate matches the app’s bundle ID
- private key installed correctly
4) Verify the device token and topic
- The device token must come from the same app bundle ID
- Your push request’s
apns-topicmust match the app’s bundle identifier exactly - If you use Notification Service Extension / VoIP / complication, the topic can differ
5) Check app-side registration
On the iPhone:
- Does the app successfully call
registerForRemoteNotifications? - Do you receive a valid device token in
didRegisterForRemoteNotificationsWithDeviceToken? - Is push permission granted?
- Is the token being sent to your backend correctly?
6) Inspect payload correctness
APNs requires valid JSON and correct headers:
apns-push-typeis required for modern APNs usage- usually
alert,background,voip, etc.
- usually
apns-priorityshould match the type- For silent pushes, include:
"aps": { "content-available": 1 }- and use push type
background
7) Confirm the app/device can actually receive pushes
Other reasons it may “look like” APNs failure:
- app uninstalled
- device offline or in Low Power mode
- Focus / notification settings suppressing display
- push token rotated after reinstall or restore
8) Check logs
Useful places:
- Your server logs for APNs response code/body
- Xcode Console on device
- Apple’s device logs if you’re testing locally
If you want, I can help you debug it systematically.
Paste any of these and I’ll tell you what’s wrong:
- the APNs response status/body
- your request headers
- a redacted example payload
- whether you’re using .p8 JWT or certificate auth
- sandbox vs production endpoint you’re targeting
Brands