How iOS 16 Web Push Notifications Work for PWAs

Apple introduced support for Web Push notifications on iOS with the release of iOS 16.4, allowing Progressive Web Apps (PWAs) to deliver native-style push alerts to iPhones and iPads. This article explains the technical requirements, the user opt-in process, the underlying architecture involving Apple Push Notification service (APNs), and how PWAs process background push events on iOS 16.

The Home Screen Requirement

Unlike desktop Safari, iOS 16 does not support Web Push notifications directly from a standard Safari browser tab. For notifications to function, users must first install the PWA by tapping the "Share" button in Safari and selecting "Add to Home Screen." Once installed and launched as a standalone app, the PWA gains access to the Web Push API and related background capabilities.

User Permission and Opt-In Flow

Push notifications cannot be triggered automatically upon opening the app. Apple enforces a strict user-gesture requirement:

  1. Explicit Interaction: The permission prompt can only be initiated by a direct user action, such as tapping an "Enable Notifications" button within the PWA interface.
  2. System Prompt: When the PWA calls Notification.requestPermission(), iOS displays the standard system-level permission modal asking the user to allow or deny notifications.
  3. Settings Integration: Once granted, the PWA appears in the iOS Settings app alongside native applications, allowing users to customize notification styles, sounds, and Focus mode behaviors.

Technical Architecture and Delivery Flow

Web Push on iOS 16 relies on established W3C standards integrated with Apple's delivery infrastructure:

  1. Service Worker Registration: The PWA registers a Service Worker, which acts as the background processor for push events even when the app is closed.
  2. Subscription Generation: The app uses the PushManager.subscribe() method along with application server keys (VAPID) to create a push subscription. Safari connects to the Apple Push Notification service (APNs) and generates a unique endpoint URL and encryption keys.
  3. Server-Side Dispatch: When the application server needs to send a notification, it transmits an encrypted payload to the APNs endpoint using standard Web Push protocols (RFC 8030).
  4. Device Delivery and Display: APNs routes the payload to the user's device. The operating system wakes the PWA's Service Worker to handle the push event. The Service Worker then executes showNotification() to display the alert on the lock screen, banner, or Notification Center.

App Badging and System Features

In addition to standard text and visual notifications, iOS 16 supports the App Badging API (navigator.setAppBadge() and navigator.clearAppBadge()). Service workers can set or clear numeric badges on the PWA’s Home Screen icon in response to push messages, mirroring the behavior of native iOS applications. Notifications also automatically respect system-level Focus modes, scheduled summaries, and Apple Watch mirroring settings configured on the device.