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.
- How does token-based APNs authentication work: what is in the JWT, how is it signed, and how often can it be refreshed?
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… - How do you budget an APNs payload: bytes versus characters, escaped slashes, and what belongs in it?
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.
- What does a UNCalendarNotificationTrigger actually match: time zones, daylight saving gaps and past dates, and what makes an attachment fail?
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
- 17.1 · UserNotifications, APNs and how a push actually gets delivered
- 17.2 · Core Location and MapKit
- 17.3 · Contacts, Calendar, Photos, HealthKit and Core Motion
- 17.4 · CloudKit, StoreKit 2 and PassKit
- 17.5 · AuthenticationServices and passkeys, Spotlight, Handoff and user activities
- 17.6 · Live Activities, WeatherKit, App Clips and CarPlay
- 17.7 · A checklist for learning any Apple framework
- 17.9 · Cleaning location fixes, choosing geofences, and map geometry
- 17.10 · Contacts, EventKit, HealthKit units and sensor availability
- 17.11 · Records, system fields and CKError handling
- 17.12 · Passkey assertions, Apple ID tokens and Live Activity payloads