17.1 · UserNotifications, APNs and how a push actually gets delivered

Notifications are the one system feature users judge your whole app by. The framework is small; the traps are permission timing, what you cannot control, and how Apple’s push service decides to deliver.

Mental model. A notification is a request to the system, not a guarantee. The user, the OS and APNs each get a veto.

Local and remote notifications

Authorization, triggers, categories and actions.

  1. How do local and remote notifications work with UserNotifications: authorization, triggers, categories, and interruption levels? 17.1.1 · L3
    Everything goes through UNUserNotificationCenter.current(). First authorization: requestAuthorization(options:) (alert, sound, badge, and optionally…

The push path

APNs, priorities, collapsing and delivery guarantees.

  1. How does the Apple Push Notification service deliver a push: tokens, priority, collapse, expiry, and what can go wrong? 17.1.2 · L5
    A remote notification travels provider (your server) → APNs → device → app. At launch the app calls registerForRemoteNotifications(); the system obtains a…

More in System frameworks