TechnologiesDevice, Sensors & Hardware

AccessoryNotifications

iOSmacOStvOSwatchOSvisionOS

AccessoryNotifications lets accessory transport extensions generate and deliver user notifications from connected AccessorySetupKit accessories on iOS. Use AccessoryNotificationCenter to forward an AccessoryNotification to the system, and adopt NotificationsForwarding to evaluate an AlertingContext and return a ForwardingDecision about whether and how to present each alert. You handle the user's reply through NotificationResponse and surface failures with AccessoryError.

Essentials 2

The principal types for forwarding accessory alerts into the system as user notifications.

  • Cl
    AccessoryNotificationCenter
    An object that forwards accessory notifications from a transport extension to the system for delivery.
  • Cl
    NotificationsForwarding
    A type you adopt to evaluate an alerting context and decide how to forward each accessory alert.

Notification Content 2

The values that describe an accessory alert and the context in which it arrives.

  • St
    AccessoryNotification
    A structure that describes a user notification generated from a connected AccessorySetupKit accessory.
  • St
    AlertingContext
    Provides hints to the accessory about the preferred alerting behavior for newly-added notifications.

User Responses 1

The value that captures how the user replied to a presented accessory notification.

  • St
    NotificationResponse
    Represents a response to a notification.

Forwarding Decisions 2

The enumerations that control whether and how an alert is presented and that report failures.

  • En
    ForwardingDecision
    Constants that specify whether and how the system should present a forwarded accessory alert.
  • En
    AccessoryError
    Constants that describe failures that occur while generating or delivering accessory notifications.
← Device, Sensors & Hardware