Menu

How Apple push works

Every push to an iPhone, iPad or Mac goes through Apple Push Notification service (APNs). Here's what sending one takes on your own, and what it takes with Pushwren.

Without PushwrenWithout PushwrenYour app sends its token, and your server decides when to send. Traffic runs between seven systems you build and run: a token store, a JWT signer, a connection pool, a fan-out queue, a retry worker, an error decoder and a delivery log.Your appsends its tokenYour serverdecides whento sendToken storeper user, per envJWT signerre-signs every hourConnection poolHTTP/2, sandbox + prodFan-out queueobeys 429 limitsRetry workerdrops dead tokens on 410Error decoderApple codes into fixesDelivery logso you can debugAPNsApple's servers
Seven systems between your server and Apple, each one yours to build, run and get paged for.
With PushwrenWith PushwrenYour app with the SDK registers itself. Your server sends with one API call, or you send from the portal or an AI tool through MCP. One steady stream flows through Pushwren, shown as a big amber button, to APNs and the iPhone. Below, three one-time steps.SDKYour appregisters itselfYour serversends with one API callor the portal, or MCPPushwrenall seven, done for youAPNsApple's servers
  1. 1 Upload your .p8 key
  2. 2 Add the Swift package
  3. 3 Send with one call

The pieces

Sandbox and production

APNs has two environments. Apps you run from Xcode get sandbox tokens; TestFlight and App Store builds get production tokens. A push sent to the wrong environment fails with BadDeviceToken. This is the most common reason a push that worked in development doesn't arrive in TestFlight. Pushwren's SDK reports which environment each device uses, and Pushwren sends each push to the right one.

What APNs confirms, and what it doesn't

When APNs answers 200, it has accepted the push. It doesn't tell you whether the device showed it: the device may be off, notifications may be turned off, or Focus may hold it. APNs reports a dead token only when you send to it, with 410 Unregistered (Handling notification responses from APNs). That's why Pushwren's delivery log says "accepted", never "delivered".

Why sending needs a server

The APNs key can send to every install of your apps, so it must never ship inside an app. Something you run has to hold it, sign each request and talk to APNs over HTTP/2 (Sending notification requests to APNs). With Pushwren, that something is Pushwren: your server makes one HTTPS call, or you send from the portal. The quickstart takes you from no account to a push on your phone.