How it is set up
The app asks iOS for permission, then receives a device token. Your server, or a provider acting for it, authenticates to APNs with a key or certificate from your Apple Developer account and sends the payload to that token.
Details that matter
- Sandbox and production use different environments and tokens, so a build installed from Xcode will not receive production pushes.
- Payloads are small, so they carry a short message or an identifier and the app fetches the rest.
- Priority and collapse settings control whether delivery is immediate and whether older alerts are replaced.
- Apple does not guarantee delivery; if a phone is off, APNs stores only the latest message for a limited time.
Common failures
Expired keys, wrong bundle identifier, using a production key against a test token, and users denying notification permission.
Questions, answered
Usually the server is hitting the sandbox environment, or the push entitlement differs between the two builds.
No. All routes use APNs, whichever provider you pay.