17.8 · APNs tokens, payload budgets and notification triggers

Most push bugs are not in the UI: they are an expired provider token, a payload that grew past its limit, or a trigger that does not mean what the schedule looked like.

Mental model. A push is a signed HTTP request carrying a small JSON document, and a local notification is a trigger whose date rules you must understand. Check bytes and calendars, not intentions.

Server side

The signed provider token and the payload you can afford.

  1. How does token-based APNs authentication work: what is in the JWT, how is it signed, and how often can it be refreshed? 17.8.1 · L5
    Instead of a per-app certificate, the provider holds one .p8 signing key (an elliptic-curve P-256 key) for the whole team. For each connection it builds a JWT…
  2. How do you budget an APNs payload: bytes versus characters, escaped slashes, and what belongs in it? 17.8.2 · L3
    The limit is 4096 bytes for the whole JSON body (5120 for VoIP), and it counts UTF-8 bytes of the serialised JSON, not Swift characters. In the run 2100…

Device side

What calendar triggers really match.

  1. What does a UNCalendarNotificationTrigger actually match: time zones, daylight saving gaps and past dates, and what makes an attachment fail? 17.8.3 · L3
    A calendar trigger matches the components you set: hour: 9, minute: 30 with repeats: true means every day at 9:30, weekday: 2 adds Mondays, and a fully…

More in System frameworks