Contents

Accessory Notifications

Receive forwarded iOS system notifications on an accessory that you develop.

Overview

The Accessory Notifications framework allows accessory companion apps to request notification forwarding from people, and receive notification content from the system through an extension model. People can choose to forward notifications from all apps, no apps, or a subset of apps on their device. Implement the extensions this framework calls into using Accessory Transport Extension, which transfers notification content and responses to and from your accessory.

Forward iOS system notifications to an accessory

The framework prompts the person to allow notification forwarding when your accessory’s companion app calls requestForwarding(for:). The method returns a ForwardingDecision that indicates the person’s choice. Check the current forwarding status for an accessory using forwardingStatus(for:), or present notification settings using presentSettings(for:scenePersistentIdentifier:).

When a person approves the prompt and the system is ready to forward a notification, the system calls NotificationsForwarding.AccessoryNotificationsHandler in an AccessoryDataProvider extension you implement to curate the notification details specifically for your accessory. The AccessoryNotification contains the complete notification data, from which you curate the details your accessory needs. AlertingContext determines if your accessory alerts for the notification, and how that alert occurs.

Respond to notifications

If someone interacts with the notification, such as tapping to dismiss it, or typing text in a quick reply, your accessory sends information back to the companion app using messageHandler(_:). The NotificationResponse structure details the reply and your app delivers it to the system by calling sendResponse(_:).

Topics

Authorization

Notification receipt

Data curation and alerting

Interactive support

Errors