### Implement AccessoryDataProvider Protocol Source: https://developer.apple.com/documentation/accessorynotifications/receiving-ios-notifications-on-an-accessory Implement the AccessoryDataProvider protocol and provide a handler conforming to NotificationsForwarding.AccessoryNotificationsHandler. This setup is required for your extension to receive notifications. ```swift import AccessoryNotifications import AccessoryTransportExtension @main struct DataProvider: AccessoryDataProvider { var extensionPoint: AppExtensionPoint { Identifier("com.apple.accessory-data-provider") Implementing { NotificationsForwarding { NotificationHandler() } } } } // Responds to system-related notification requests. class NotificationHandler: AccessoryNotificationsHandler { var session: NotificationsForwarding.Session? func activate(for session: NotificationsForwarding.Session) { self.session = session } func add(notification: AccessoryNotification, alertingContext: AlertingContext, alertCoordinator: AlertCoordinating) { // Curate the notification details for your accessory. } func update(notification: AccessoryNotification) { // Accommodate updated notification data. } func remove(notification: AccessoryNotification) { // Remove a previously displayed notification. } func removeAllNotifications() { // Remove all notifications. } } ``` -------------------------------- ### Initialize AccessoryNotification.Action Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/action/init%28identifier%3Atitle%3Atype%3A%29 Use this initializer to create a notification action with a unique identifier, an optional display title, and a specified action type. Available on iOS and iPadOS starting from version 26.5. ```swift init( identifier: String, title: String? = nil, type: AccessoryNotification.Action.ActionType ) ``` -------------------------------- ### Define AlertingContext Structure Source: https://developer.apple.com/documentation/accessorynotifications/alertingcontext Defines the AlertingContext structure used for guiding notification alerts on accessories. Available on iOS and iPadOS 26.5+ Beta. ```swift struct AlertingContext ``` -------------------------------- ### AccessoryError.unsupportedAccessory Source: https://developer.apple.com/documentation/accessorynotifications/accessoryerror/unsupportedaccessory An error that indicates the system doesn’t support notification forwarding for the provided accessory. This error is available starting from iOS 26.5+ Beta and iPadOS 26.5+ Beta. ```APIDOC ## AccessoryError.unsupportedAccessory ### Description An error that indicates the system doesn’t support notification forwarding for the provided accessory. ### Method N/A (This is an error case, not an API endpoint) ### Endpoint N/A ### Parameters N/A ### Request Example N/A ### Response N/A ## Discussion This error indicates that the argument specified in the `requestForwarding(for:)` call doesn’t support notification forwarding. ## See Also ### Platform and accessory errors `case unsupportedPlatform` An error that indicates the current platform doesn’t support notification forwarding. ``` -------------------------------- ### Get Accessory Forwarding Status Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotificationcenter/forwardingstatus%28for%3A%29 Use this method to determine the forwarding decision for a specific accessory. Requires iOS 26.5+ or iPadOS 26.5+. ```swift func forwardingStatus(for accessory: ASAccessory) async throws -> ForwardingDecision ``` -------------------------------- ### Get Forwarding Status Source: https://developer.apple.com/documentation/AccessoryNotifications/AccessoryNotificationCenter Retrieves the current forwarding status for a given accessory. This method is asynchronous and may throw an error. ```swift func forwardingStatus(for: ASAccessory) async throws -> ForwardingDecision ``` -------------------------------- ### AccessoryNotification.contextIcon Property Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/contexticon The contextIcon property is an optional file that represents a secondary icon providing additional contextual information for the notification. It is available on iOS and iPadOS starting from version 26.5 (Beta). ```APIDOC ## AccessoryNotification.contextIcon ### Description A secondary icon that provides additional contextual information about the notification. ### Type `AccessoryNotification.File?` ### Availability iOS 26.5+ Beta iPadOS 26.5+ Beta ### Discussion For communication notifications, this image might be a message sender’s avatar or group chat icon. ### See Also - `attachments`: An array of files sent with the notification. - `sourceIcon`: An icon that represents the app that sent the notification. - `struct File`: A file associated with a notification. ``` -------------------------------- ### init(identifier:sourceName:deliveryDate:displayDate:title:subtitle:body:threadIdentifier:attributes:summary:actions:sourceIcon:contextIcon:attachments:) Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/init%28identifier%3Asourcename%3Adeliverydate%3Adisplaydate%3Atitle%3Asubtitle%3Abody%3Athreadidentifier%3Aattributes%3Asummary%3Aactions%3Asourceicon%3Acontexticon%3Aattachments%3A%29 Initializes an accessory notification with the specified parameters. ```APIDOC ## init(identifier:sourceName:deliveryDate:displayDate:title:subtitle:body:threadIdentifier:attributes:summary:actions:sourceIcon:contextIcon:attachments:) ### Description Initializes an accessory notification. ### Parameters - **identifier** (AccessoryNotification.Identifier) - Required - A unique identifier for the notification. - **sourceName** (String) - Required - The name of the bundle that sent the notification. - **deliveryDate** (Date) - Required - The timestamp when the system received the notification. - **displayDate** (AccessoryNotification.DisplayDate) - Optional - The preferred date and format to display. - **title** (String?) - Optional - The notification’s primary text. - **subtitle** (String?) - Optional - The notification’s secondary text. - **body** (NSAttributedString?) - Optional - The notification’s main content. - **threadIdentifier** (String?) - Optional - An identifier for grouping related notifications. - **attributes** (AccessoryNotification.Attributes) - Optional - The priority attributes for the notification. - **summary** (NSAttributedString?) - Optional - An Apple Intelligence summary. - **actions** ([AccessoryNotification.Action]) - Optional - Possible user interactions. - **sourceIcon** (AccessoryNotification.File?) - Optional - The source app’s icon. - **contextIcon** (AccessoryNotification.File?) - Optional - A contextual icon for additional information. - **attachments** ([AccessoryNotification.File]) - Optional - Files sent with the notification. ``` -------------------------------- ### Build Protocol Information String Source: https://developer.apple.com/documentation/accessorynotifications/receiving-ios-notifications-on-an-accessory Construct the protocol information string using ciphersuite, version, and device identifier. ```swift let ciphersuite = keyMaterial.ciphersuite.description // The value is "XWing" or "P256". let version = keyMaterial.version.description // Always "v1". let identifier = keyMaterial.identifier // The device's UUID. let protocolInfo = Data("\(ciphersuite)-\(version)-\(identifier)".utf8) ``` -------------------------------- ### init(notificationIdentifier:sourceIdentifier:) Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/identifier-swift.struct/init%28notificationidentifier%3Asourceidentifier%3A%29 Initializes a new AccessoryNotification instance with the specified notification and source identifiers. ```APIDOC ## init(notificationIdentifier:sourceIdentifier:) ### Description Initializes a new AccessoryNotification instance with the specified notification and source identifiers. ### Parameters #### Request Body - **notificationIdentifier** (String) - Required - The identifier for the notification. - **sourceIdentifier** (String) - Required - The identifier for the source of the notification. ``` -------------------------------- ### Initializer: init(notificationCanAlert:suppressedByFocus:isIncomingCall:sound:) Source: https://developer.apple.com/documentation/accessorynotifications/alertingcontext/init%28notificationcanalert%3Asuppressedbyfocus%3Aisincomingcall%3Asound%3A%29 Initializes a new AlertingContext instance with specified notification and sound parameters. ```APIDOC ## init(notificationCanAlert:suppressedByFocus:isIncomingCall:sound:) ### Description Initializes an AlertingContext object to define how notifications are handled by an accessory. ### Parameters #### Request Body - **notificationCanAlert** (Bool) - Optional - Indicates if the notification can trigger an alert. Defaults to false. - **suppressedByFocus** (Bool) - Optional - Indicates if the notification is suppressed by Focus mode. Defaults to false. - **isIncomingCall** (Bool) - Optional - Indicates if the notification is an incoming call. Defaults to false. - **sound** (AlertingContext.Sound?) - Optional - The sound associated with the notification. Defaults to nil. ### Request Example init(notificationCanAlert: true, suppressedByFocus: false, isIncomingCall: false, sound: nil) ``` -------------------------------- ### Implement AccessoryTransportSecurity Protocol Source: https://developer.apple.com/documentation/accessorynotifications/receiving-ios-notifications-on-an-accessory Define the main entry point for the extension and handle incoming security session requests. ```swift import AccessoryTransportExtension import CryptoKit @main struct TransportSecurity: AccessoryTransportSecurity { @AppExtensionPoint.Bind static var boundExtensionPoint: AppExtensionPoint { Identifier("com.apple.accessory-transport-security") } func accept(sessionRequest: AccessorySecuritySession.Request) -> AccessorySecuritySession.Request.Decision { return sessionRequest.accept { SecurityEventHandler(session: sessionRequest.session) } } } ``` -------------------------------- ### Initialize AlertingContext Source: https://developer.apple.com/documentation/accessorynotifications/alertingcontext/init%28notificationcanalert%3Asuppressedbyfocus%3Aisincomingcall%3Asound%3A%29 Initializes a new AlertingContext instance with optional parameters for notification behavior and sound. ```swift init( notificationCanAlert: Bool = false, suppressedByFocus: Bool = false, isIncomingCall: Bool = false, sound: AlertingContext.Sound? = nil ) ``` -------------------------------- ### Handle Key Requests Source: https://developer.apple.com/documentation/accessorynotifications/receiving-ios-notifications-on-an-accessory Generate key pairs and respond to key requests using XWing or P256 ciphersuites. ```swift func handleKeyRequest() { do { // Generate an XWing key pair. let privateKey = try XWingMLKEM768X25519.PrivateKey() privateKeyData = privateKey.seedRepresentation publicKeyData = privateKey.publicKey.rawRepresentation // Return the public key to the system. let event: AccessorySecurity.Event = .keyReply( ciphersuite: .XWing, publicKey: publicKeyData ) try session.sendSecurityEvent(event) } catch { session.cancel(error: error) } } ``` ```swift let privateKey = P256.KeyAgreement.PrivateKey() privateKeyData = privateKey.rawRepresentation publicKeyData = privateKey.publicKey.rawRepresentation let event: AccessorySecurity.Event = .keyReply( ciphersuite: .P256, publicKey: publicKeyData ) ``` -------------------------------- ### Initialize an AccessoryNotification Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/init%28identifier%3Asourcename%3Adeliverydate%3Adisplaydate%3Atitle%3Asubtitle%3Abody%3Athreadidentifier%3Aattributes%3Asummary%3Aactions%3Asourceicon%3Acontexticon%3Aattachments%3A%29 Use this initializer to create a new accessory notification instance with the required identifier, source name, and delivery date, along with optional content and configuration parameters. ```swift init( identifier: AccessoryNotification.Identifier, sourceName: String, deliveryDate: Date, displayDate: AccessoryNotification.DisplayDate = .deliveryDate, title: String? = nil, subtitle: String? = nil, body: NSAttributedString? = nil, threadIdentifier: String? = nil, attributes: AccessoryNotification.Attributes = [], summary: NSAttributedString? = nil, actions: [AccessoryNotification.Action] = [], sourceIcon: AccessoryNotification.File? = nil, contextIcon: AccessoryNotification.File? = nil, attachments: [AccessoryNotification.File] = [] ) ``` -------------------------------- ### Initialize AccessoryNotification Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/identifier-swift.struct/init%28notificationidentifier%3Asourceidentifier%3A%29 Use this initializer to create an AccessoryNotification instance. Requires both notificationIdentifier and sourceIdentifier. This API is in beta. ```swift init( notificationIdentifier: String, sourceIdentifier: String ) ``` -------------------------------- ### Request notification forwarding for an accessory Source: https://developer.apple.com/documentation/AccessoryNotifications/AccessoryNotificationCenter/requestForwarding%28for%3A%29 Use this method to initiate the system prompt for notification forwarding permissions. It is only supported on iPhone and will throw an error on other platforms. ```swift func requestForwarding(for accessory: ASAccessory) async throws -> ForwardingDecision ``` -------------------------------- ### AccessoryNotification.Action Initializer Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/action/init%28identifier%3Atitle%3Atype%3A%29 Initializes a notification action with the given identifier, title, and type. ```APIDOC ## init(identifier:title:type:) ### Description Initializes a notification action with the given identifier, title, and type. ### Method Initializer ### Endpoint N/A (Swift Initializer) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **identifier** (String) - Required - A unique identifier for the action. - **title** (String?) - Optional - The action’s display title. - **type** (AccessoryNotification.Action.ActionType) - Required - The action’s type. ### Request Example ```swift let action = AccessoryNotification.Action(identifier: "myAction", title: "Perform Action", type: .custom) ``` ### Response #### Success Response (200) N/A (Initializer does not return a value in the traditional sense, it creates an object.) #### Response Example N/A ``` -------------------------------- ### Initialize AlertingContext Source: https://developer.apple.com/documentation/accessorynotifications/alertingcontext Initializes an AlertingContext with details about notification alerting capabilities and focus state. Requires information on whether the accessory can alert, if focus suppresses alerts, if it's an incoming call, and optional sound information. ```swift init(notificationCanAlert: Bool, suppressedByFocus: Bool, isIncomingCall: Bool, sound: AlertingContext.Sound?) ``` -------------------------------- ### Present Notification Settings Source: https://developer.apple.com/documentation/AccessoryNotifications/AccessoryNotificationCenter Presents the notification settings for a specific accessory. This allows users to configure forwarding preferences. This method is asynchronous and may throw an error. ```swift func presentSettings(for: ASAccessory, scenePersistentIdentifier: String?) async throws -> ForwardingDecision ``` -------------------------------- ### AccessoryNotificationCenter Methods Source: https://developer.apple.com/documentation/AccessoryNotifications/AccessoryNotificationCenter Methods for managing notification forwarding lifecycle and settings for accessories. ```APIDOC ## requestForwarding(for:) ### Description Requests permission to forward notifications to the specified accessory. ### Method async throws ### Parameters #### Path Parameters - **for** (ASAccessory) - Required - The accessory to request forwarding for. ### Response - **ForwardingDecision** - The decision made regarding the forwarding request. ``` ```APIDOC ## forwardingStatus(for:) ### Description Checks the current notification forwarding status for a specific accessory. ### Method async throws ### Parameters #### Path Parameters - **for** (ASAccessory) - Required - The accessory to check status for. ### Response - **ForwardingDecision** - The current status of the forwarding permission. ``` ```APIDOC ## presentSettings(for:scenePersistentIdentifier:) ### Description Displays the notification settings for the specified accessory. ### Method async throws ### Parameters #### Path Parameters - **for** (ASAccessory) - Required - The accessory to present settings for. - **scenePersistentIdentifier** (String?) - Optional - The persistent identifier for the scene. ``` -------------------------------- ### Register for Notification Forwarding Source: https://developer.apple.com/documentation/accessorynotifications/receiving-ios-notifications-on-an-accessory Call this method to register your accessory's companion app for notification forwarding. The system will then prompt the user for permission. ```swift import AccessoryNotifications import AccessorySetupKit // Register the accessory with AccessorySetupKit. let accessory: ASAccessory = /* ... */ // Prompt for permission to opt into notification forwarding. let center = AccessoryNotificationCenter() let result = try await center.requestForwarding(for: accessory) ``` -------------------------------- ### AccessoryNotification.DisplayDate.allDayDate(_:) Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/displaydate-swift.enum/contentdate%28_%3A%29 Use this case to display a date for all-day events. It requires a `Date` object as a parameter. ```swift case allDayDate(Date) ``` -------------------------------- ### Initialize AccessoryNotificationCenter Source: https://developer.apple.com/documentation/AccessoryNotifications/AccessoryNotificationCenter Initializes an accessory notifications center object. This is the first step in setting up notification forwarding. ```swift init() ``` -------------------------------- ### Implement Notification Handler Source: https://developer.apple.com/documentation/accessorynotifications Implement this protocol in an `AccessoryDataProvider` extension to receive notification arrivals, updates, or removals. Curate necessary information from `AccessoryNotification` and return it using `sendMessage(_:)`. ```swift NotificationsForwarding.AccessoryNotificationsHandler ``` -------------------------------- ### AccessoryError.unsupportedPlatform Source: https://developer.apple.com/documentation/accessorynotifications/accessoryerror/unsupportedplatform An error that indicates the current platform doesn’t support notification forwarding. ```APIDOC ## AccessoryError.unsupportedPlatform ### Description An error that indicates the current platform doesn’t support notification forwarding. ### Platform Availability iOS 26.5+ Beta iPadOS 26.5+ Beta ### Case ```swift case unsupportedPlatform ``` ### Discussion This error can occur if you call `requestForwarding(for:)` on a platform other than iOS. ### See Also * `case unsupportedAccessory` - An error that indicates the system doesn’t support notification forwarding for the provided accessory. ``` -------------------------------- ### Define Security Event Handler Source: https://developer.apple.com/documentation/accessorynotifications/receiving-ios-notifications-on-an-accessory Create a class conforming to AccessorySecuritySession.EventHandler to process security events. ```swift class SecurityEventHandler: AccessorySecuritySession.EventHandler { private var session: AccessorySecuritySession private var keyMaterial: AccessorySecurity.Crypto.KeyMaterial? private var publicKeyData: Data? private var privateKeyData: Data? init(session: AccessorySecuritySession) { self.session = session } func securityEventHandler(event: AccessorySecurity.Event) { switch event { case .keyRequest: handleKeyRequest() case .keyExchange(let keyMaterial): handleKeyExchange(keyMaterial: keyMaterial) default: break } } // Cleans up key material. func invalidationHandler(error: (any Error)?) { keyMaterial = nil privateKeyData = nil publicKeyData = nil } } ``` -------------------------------- ### requestForwarding(for:) Source: https://developer.apple.com/documentation/AccessoryNotifications/AccessoryNotificationCenter/requestForwarding%28for%3A%29 Requests permission to forward notifications to the specified accessory. ```APIDOC ## requestForwarding(for:) ### Description Requests permission to forward notifications to the specified accessory. This method prompts the user to select which apps on their device can forward notifications to the accessory. ### Method Instance Method ### Parameters #### Path Parameters - **accessory** (ASAccessory) - Required - An accessory object that AccessorySetupKit provides when your companion app registers the accessory. ### Request Example func requestForwarding(for accessory: ASAccessory) async throws -> ForwardingDecision ### Response #### Success Response - **ForwardingDecision** (Enum) - The user's choice regarding notification forwarding (all apps, some apps, no apps, or dismissed). ### Error Handling - Throws `AccessoryError.unsupportedPlatform` if called on an unsupported device; notification forwarding supports iPhone only. ``` -------------------------------- ### Facilitate a key exchange Source: https://developer.apple.com/documentation/accessorynotifications/receiving-ios-notifications-on-an-accessory Handles the key exchange event by forwarding cryptographic material to the accessory and returning the encapsulated key to the system. ```swift func handleKeyExchange(keyMaterial: AccessorySecurity.Crypto.KeyMaterial) { guard let privateKeyData = privateKeyData, let publicKeyData = publicKeyData else { session.cancel(error: nil) return } self.keyMaterial = keyMaterial do { // Send key material to the accessory via Bluetooth. sendKeyMaterialToAccessory(keyMaterial) // Receive encapsulated key from the accessory. let encapsulatedKey = receiveEncapsulatedKeyFromAccessory() // Send encapsulated key to the system. let event: AccessorySecurity.Event = .encapsulatedKey(encapsulatedKey) try session.sendSecurityEvent(event) } catch { session.cancel(error: error) } } ``` -------------------------------- ### Initialize Accessory Notification Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification Initializes an accessory notification with all its components. This initializer is used when creating a new notification object. ```swift init(identifier: AccessoryNotification.Identifier, sourceName: String, deliveryDate: Date, displayDate: AccessoryNotification.DisplayDate, title: String?, subtitle: String?, body: NSAttributedString?, threadIdentifier: String?, attributes: AccessoryNotification.Attributes, summary: NSAttributedString?, actions: [AccessoryNotification.Action], sourceIcon: AccessoryNotification.File?, contextIcon: AccessoryNotification.File?, attachments: [AccessoryNotification.File]) ``` -------------------------------- ### Accessing the file URL Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/file/url Retrieves the URL for the file's data asynchronously. ```swift var url: URL { get async throws } ``` -------------------------------- ### Request Notification Forwarding Source: https://developer.apple.com/documentation/AccessoryNotifications Companion apps can call `requestForwarding(for:)` to prompt the user to allow notification forwarding. The system uses the provided accessory reference to identify the device. ```APIDOC ## POST /requestForwarding ### Description Requests permission from the user to forward notifications to the accessory. ### Method POST ### Endpoint /requestForwarding ### Parameters #### Query Parameters - **accessoryReference** (string) - Required - A reference to the accessory provided by AccessorySetupKit. ### Request Example ```json { "accessoryReference": "YOUR_ACCESSORY_REFERENCE" } ``` ### Response #### Success Response (200) - **forwardingDecision** (ForwardingDecision) - An enum indicating the user's choice regarding notification forwarding. #### Response Example ```json { "forwardingDecision": "granted" } ``` ``` -------------------------------- ### AccessoryNotification.Action Structure Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/action Defines the structure for notification actions, including initialization and property access. ```APIDOC ## AccessoryNotification.Action ### Description A structure representing a possible user interaction with a notification. ### Initializer `init(identifier: String, title: String?, type: AccessoryNotification.Action.ActionType)` Initializes a notification action with the given identifier, title, and type. ### Properties - **identifier** (String) - A unique identifier for the action. - **title** (String?) - A title for the action. - **type** (AccessoryNotification.Action.ActionType) - The type of action available for a notification. ### Conformance - Decodable - Encodable - Equatable ``` -------------------------------- ### Configure Accessory Data Provider Extension Source: https://developer.apple.com/documentation/accessorynotifications/receiving-ios-notifications-on-an-accessory Specify the extension point identifier and declare the AccessoryNotifications.NotificationsForwarding capability in your extension's Info.plist. ```plist EXAppExtensionAttributes EXExtensionPointIdentifier com.apple.accessory-data-provider EXCapabilities AccessoryNotifications.NotificationsForwarding ``` -------------------------------- ### Request Notification Forwarding Source: https://developer.apple.com/documentation/accessorynotifications Call this method from your companion app to prompt the user to allow notification forwarding. The system identifies your accessory via AccessorySetupKit. It returns a `ForwardingDecision` indicating the user's choice. ```swift requestForwarding(for:) ``` -------------------------------- ### AccessoryNotification.File Structure Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/file Represents a file associated with an accessory notification, used for attachments and icons. ```APIDOC ## AccessoryNotification.File A file associated with a notification. ### Description The `AccessoryNotification.File` structure’s `attachments`, `sourceIcon`, and `contextIcon` properties use this type. ### Properties #### url `var url: URL` A URL that locates the file’s data. #### type `var type: UTType` A uniform type identifier for the file. ### Conforms To - `Decodable` - `Encodable` - `Equatable` ### See Also - `attachments`: `let attachments: [AccessoryNotification.File]` - An array of files sent with the notification. - `sourceIcon`: `let sourceIcon: AccessoryNotification.File?` - An icon that represents the app that sent the notification. - `contextIcon`: `let contextIcon: AccessoryNotification.File?` - A secondary icon that provides additional contextual information about the notification. ``` -------------------------------- ### Configure Extension Point Identifier Source: https://developer.apple.com/documentation/accessorynotifications/receiving-ios-notifications-on-an-accessory Specify the extension point identifier in the extension's target properties. ```xml EXAppExtensionAttributes EXExtensionPointIdentifier com.apple.accessory-transport-security ``` -------------------------------- ### AccessoryNotification Structure Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification Defines the structure and initialization of an AccessoryNotification object. ```APIDOC ## AccessoryNotification ### Description A structure that contains the details of a notification that iOS provides to your accessory. ### Initialization `init(identifier: AccessoryNotification.Identifier, sourceName: String, deliveryDate: Date, displayDate: AccessoryNotification.DisplayDate, title: String?, subtitle: String?, body: NSAttributedString?, threadIdentifier: String?, attributes: AccessoryNotification.Attributes, summary: NSAttributedString?, actions: [AccessoryNotification.Action], sourceIcon: AccessoryNotification.File?, contextIcon: AccessoryNotification.File?, attachments: [AccessoryNotification.File])` ### Properties - **identifier** (AccessoryNotification.Identifier) - Unique identifier for the notification. - **sourceName** (String) - Display name for the bundle that sent the notification. - **deliveryDate** (Date) - Timestamp indicating when the system received the notification. - **displayDate** (AccessoryNotification.DisplayDate) - Preferred date and format for display. - **title** (String?) - Primary text for the notification. - **subtitle** (String?) - Secondary text for the notification. - **body** (NSAttributedString?) - Main content of the notification. - **threadIdentifier** (String?) - Identifier used to group notifications in the same thread. - **attributes** (AccessoryNotification.Attributes) - Priority level attributes. - **summary** (NSAttributedString?) - Apple Intelligence summary. - **actions** ([AccessoryNotification.Action]) - Array of possible user interactions. - **sourceIcon** (AccessoryNotification.File?) - Icon representing the sending app. - **contextIcon** (AccessoryNotification.File?) - Secondary contextual icon. - **attachments** ([AccessoryNotification.File]) - Array of files associated with the notification. ``` -------------------------------- ### AccessoryNotification.File URL Property Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/file/url This snippet describes the 'url' instance property of AccessoryNotification.File, which returns a URL to the file's data. This URL can be used to retrieve the data for transmission to the accessory. ```APIDOC ## AccessoryNotification.File.url ### Description A URL that locates the file’s data. ### Method Getter ### Endpoint N/A (Instance Property) ### Parameters None ### Request Body None ### Request Example ```swift var url: URL { get async throws } ``` ### Response #### Success Response (200) - **url** (URL) - A URL object pointing to the file data. #### Response Example ```json { "url": "file:///path/to/accessory/notification.data" } ``` ### Discussion Use this URL to retrieve the file’s data and include its contents in your transmission to the accessory. **Note:** This documentation pertains to beta software and is subject to change. ``` -------------------------------- ### AccessoryNotification.DisplayDate.contentDate(_:) Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/displaydate-swift.enum/contentdate%28_%3A%29 Use this case to display a specific date and time for a notification. It requires a `Date` object as a parameter. ```swift case contentDate(Date) ``` -------------------------------- ### Create HPKE Recipient Source: https://developer.apple.com/documentation/accessorynotifications/receiving-ios-notifications-on-an-accessory Initialize an HPKE recipient using either XWing or P256 ciphersuites. ```swift let publicKey = try XWingMLKEM768X25519.PublicKey(rawRepresentation: accessoryPublicKeyData) let privateKey = try XWingMLKEM768X25519.PrivateKey( seedRepresentation: accessoryPrivateKeyData, publicKey: publicKey ) let recipient = try HPKE.Recipient( privateKey: privateKey, ciphersuite: .XWingMLKEM768X25519_SHA256_AES_GCM_256, info: protocolInfo, encapsulatedKey: keyMaterial.encapsulatedKey ) ``` ```swift let privateKey = try P256.KeyAgreement.PrivateKey(rawRepresentation: accessoryPrivateKeyData) let recipient = try HPKE.Recipient( privateKey: privateKey, ciphersuite: .P256_SHA256_AES_GCM_256, info: protocolInfo, encapsulatedKey: keyMaterial.encapsulatedKey ) ``` -------------------------------- ### Define AccessoryNotification File Struct Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/attachments This Swift code defines the 'File' struct, which represents a file associated with a notification. This is a Beta feature. ```swift struct File ``` -------------------------------- ### Check Alerting Recommendation Source: https://developer.apple.com/documentation/accessorynotifications The `shouldAlert` property of `AlertingContext` provides the recommended behavior for alerting, matching the system's alerting logic. ```swift shouldAlert ``` -------------------------------- ### AccessoryNotification.Action.ActionType Enumeration Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/action/actiontype Defines the available action types for an AccessoryNotification.Action. ```APIDOC ## AccessoryNotification.Action.ActionType ### Description The types of actions available for a notification. Used by the `type` property of the `AccessoryNotification.Action` structure. ### Enumeration Cases - **dismiss**: An action type that dismisses a notification. - **background**: An action type that handles background interactions with a notification. - **textInput(placeholder: String)**: An action type that captures text provided by a person in response to a notification. ### Relationships - **Conforms To**: Decodable, Encodable, Equatable ``` -------------------------------- ### AccessoryError.unableToGetUserResponse Source: https://developer.apple.com/documentation/accessorynotifications/accessoryerror/unabletogetuserresponse An error that indicates the system is unable to handle a notification response. ```APIDOC ## AccessoryError.unableToGetUserResponse ### Description An error that indicates the system is unable to handle a notification response. ### Availability iOS 26.5+ Beta iPadOS 26.5+ Beta ### Code Example ```swift case unableToGetUserResponse ``` ### See Also - `case invalidNotificationResponse`: An error that indicates the system failed to handle a notification response. ``` -------------------------------- ### Check Recommended Alerting Behavior Source: https://developer.apple.com/documentation/accessorynotifications/alertingcontext A Boolean value indicating the recommended alerting behavior for a notification. Use this to decide how to present the notification to the user. ```swift var shouldAlert: Bool ``` -------------------------------- ### Define priority attribute Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/attributes-swift.struct/timesensitive Represents a priority notification attribute. ```swift static let priority: AccessoryNotification.Attributes ``` -------------------------------- ### Define background Action Type Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/action/actiontype/textinput%28placeholder%3A%29 Use this case to define an action type that handles background interactions with a notification. This is a beta feature. ```swift case background ``` -------------------------------- ### Receive and Process Notifications Source: https://developer.apple.com/documentation/AccessoryNotifications Implement `NotificationsForwarding.AccessoryNotificationsHandler` within an `AccessoryDataProvider` extension to receive, process, and curate notification data from the system. ```APIDOC ## POST /notifications/process ### Description Receives and processes incoming notifications forwarded from the iOS system. ### Method POST ### Endpoint /notifications/process ### Parameters #### Request Body - **notificationData** (AccessoryNotification) - Required - The structure containing details of the forwarded notification. ### Request Example ```json { "notificationData": { "content": { "title": "New Message", "body": "You have a new message from John." }, "icon": "base64EncodedIconData", "attachments": [], "interactions": [] } } ``` ### Response #### Success Response (200) - **status** (string) - Indicates the success of processing the notification. #### Response Example ```json { "status": "processed" } ``` ``` -------------------------------- ### Check if Accessory Can Alert Source: https://developer.apple.com/documentation/accessorynotifications/alertingcontext A Boolean value indicating whether the accessory is capable of alerting the user for the notification. This property should be checked before attempting to alert. ```swift var notificationCanAlert: Bool ``` -------------------------------- ### Implement an extension to relay encrypted notifications Source: https://developer.apple.com/documentation/accessorynotifications/receiving-ios-notifications-on-an-accessory Defines an event handler to transmit encrypted notification data and feature IDs to the accessory. ```swift class TransportEventHandler: AccessoryTransportSession.EventHandler { func dataEventHandler(event: AccessoryTransportSession.DataEvent) { switch event { case .ciphertext(let data, let featureID): // Transmit encrypted notification data and the provided feature ID // to the accessory over Bluetooth. sendToAccessory(data, featureID) } } func invalidationHandler(error: AccessoryTransportSession.Error?) { // Clean up when the session ends. } } ``` -------------------------------- ### Process and Send Notification Data Source: https://developer.apple.com/documentation/accessorynotifications/receiving-ios-notifications-on-an-accessory Handle incoming notifications, extract relevant data, serialize it, and send it to your accessory via Bluetooth. Ensure to complete the alert coordination. ```swift func add(notification: AccessoryNotification, alertingContext: AlertingContext, alertCoordinator: AlertCoordinating) { // Check if the notification needs to alert. guard alertingContext.shouldAlert else { alertCoordinator.complete(didAlert: false) return } // Extract and serialize notification data. let notificationData = serializeNotification(notification) // Create a message payload. let message = AccessoryMessage { AccessoryMessage.Payload(transport: .bluetooth, data: notificationData) } // Send the message payload to your accessory. Task { do { try await session?.sendMessage(message) alertCoordinator.complete(didAlert: true) } catch { alertCoordinator.fail(error) } } } // Chooses fields the accessory supports and implements a custom binary format. func serializeNotification(_ notification: AccessoryNotification) -> Data { var data = Data() // Add title, subtitle, body, and so on. return data } ``` -------------------------------- ### Decrypt and Display Notifications on Accessory Source: https://developer.apple.com/documentation/AccessoryNotifications Accessories receive encrypted notification data and use HPKE (RFC9180) decryption to parse details. `AlertingContext` helps determine if an alert should be sent. ```APIDOC ## Accessory Notification Handling ### Description This section describes the process on the accessory side for decrypting and displaying notifications. ### Process 1. **Receive Encrypted Data**: The accessory receives encrypted notification data transmitted via the `AccessoryTransportAppExtension`. 2. **Decrypt Data**: Implement HPKE (RFC9180) decryption using provided keys to parse the notification details. 3. **Parse Notification Details**: Extract information such as display content, icons, attachments, and interactions from the decrypted `AccessoryNotification` structure. 4. **Determine Alerting**: Use the `AlertingContext` and its `shouldAlert` property to decide whether to present an alert to the user, matching the system's alerting logic. 5. **Display Notification**: Present the notification content to the user on the accessory interface. ``` -------------------------------- ### AccessoryNotification.File Type Property Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/file/type Retrieves a uniform type identifier for the file associated with an accessory notification. ```APIDOC ## AccessoryNotification.File Type ### Description A uniform type identifier for the file. ### Availability iOS 26.5+ Beta iPadOS 26.5+ Beta ### Instance Property ```swift var type: UTType { get } ``` ### Beta Software Notice This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software. Learn more about using Apple's beta software. ``` -------------------------------- ### AccessoryNotification.attachments Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/attachments Retrieves an array of files associated with an accessory notification. ```APIDOC ## AccessoryNotification.attachments ### Description An array of files sent with the notification. ### Properties - **attachments** ([AccessoryNotification.File]) - An array of files associated with the notification. ### Availability - iOS 26.5+ Beta - iPadOS 26.5+ Beta ``` -------------------------------- ### AccessoryNotification.Action.ActionType.textInput Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/action/actiontype/textinput%28placeholder%3A%29 Defines the textInput action type used to capture user input in response to a notification. ```APIDOC ## AccessoryNotification.Action.ActionType.textInput(placeholder:) ### Description An action type that captures text provided by a person in response to a notification. ### Parameters - **placeholder** (String) - Required - Text that acts as a placeholder for the text input field. ### Syntax ```swift case textInput(placeholder: String) ``` ``` -------------------------------- ### AccessoryNotification Related Media Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/attachments Properties for accessing icons and file structures related to notifications. ```APIDOC ## Related Media Properties ### sourceIcon - **Type**: AccessoryNotification.File? - **Description**: An icon that represents the app that sent the notification. ### contextIcon - **Type**: AccessoryNotification.File? - **Description**: A secondary icon that provides additional contextual information about the notification. ### struct File - **Description**: A file associated with a notification. ``` -------------------------------- ### Send Curated Notification Data Source: https://developer.apple.com/documentation/AccessoryNotifications Send curated notification data to the system using `AccessoryFeatureSession.sendMessage(_:)` for encryption and delivery to the accessory. ```APIDOC ## POST /session/sendMessage ### Description Sends curated notification data to the system for encryption and delivery to the accessory. ### Method POST ### Endpoint /session/sendMessage ### Parameters #### Request Body - **curatedData** (object) - Required - The curated notification data to be sent. - **securityKeys** (object) - Required - Keys for encrypting the data via AccessoryTransportSecurity extension. ### Request Example ```json { "curatedData": { "displayTitle": "New Message", "displayBody": "John sent you a message.", "alertType": "standard" }, "securityKeys": { "publicKey": "YOUR_PUBLIC_KEY" } } ``` ### Response #### Success Response (200) - **deliveryStatus** (string) - The status of the data delivery. #### Response Example ```json { "deliveryStatus": "delivered" } ``` ``` -------------------------------- ### AccessoryNotification.Action.ActionType.background Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/action/actiontype/background Defines the background action type for handling accessory notification interactions. ```APIDOC ## AccessoryNotification.Action.ActionType.background ### Description An action type that handles background interactions with a notification. The companion app can perform a task in the background when a person interacts with the notification, even if the app is not running on the accessory. ### Availability - iOS 26.5+ Beta - iPadOS 26.5+ Beta ### Definition ```swift case background ``` ``` -------------------------------- ### AccessoryNotification.Action.ActionType Cases Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/action/actiontype Provides specific action types for notifications. Use 'dismiss' to close a notification, 'background' for background handling, and 'textInput' to capture user text input. ```swift case dismiss ``` ```swift case background ``` ```swift case textInput(placeholder: String) ``` -------------------------------- ### AlertingContext Structure Source: https://developer.apple.com/documentation/accessorynotifications/alertingcontext The AlertingContext structure defines the behavior and properties for alerting a user about a notification on an accessory. ```APIDOC ## struct AlertingContext ### Description A structure that provides guidance for how to alert for a notification. ### Properties - **shouldAlert** (Bool) - A Boolean value that indicates the recommended alerting behavior. - **notificationCanAlert** (Bool) - A Boolean value that indicates whether the accessory can alert the person for the notification. - **isSuppressedByFocus** (Bool) - A Boolean value that indicates whether the device’s Focus state suppresses notification alerts. - **isIncomingCall** (Bool) - A flag to indicate whether the notification represents an incoming call. - **sound** (AlertingContext.Sound?) - Indicates that this alert may play a sound. nil means there is no sound. ### Initializers - **init(notificationCanAlert: Bool, suppressedByFocus: Bool, isIncomingCall: Bool, sound: AlertingContext.Sound?)** - Initializes a new AlertingContext instance. ``` -------------------------------- ### AccessoryNotification.DisplayDate.hideDate Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/displaydate-swift.enum/hidedate An option that indicates the accessory doesn’t display a date. ```APIDOC ## AccessoryNotification.DisplayDate.hideDate ### Description An option that indicates the accessory doesn’t display a date. ### Availability - iOS 26.5+ Beta - iPadOS 26.5+ Beta ### Definition ```swift case hideDate ``` ``` -------------------------------- ### Accessing the priority attribute Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/attributes-swift.struct/priority Use this static property to specify a priority notification attribute. ```swift static let priority: AccessoryNotification.Attributes ``` ```swift static let critical: AccessoryNotification.Attributes ``` ```swift static let timeSensitive: AccessoryNotification.Attributes ``` -------------------------------- ### Request Notification Forwarding Source: https://developer.apple.com/documentation/AccessoryNotifications/AccessoryNotificationCenter Requests permission to forward notifications to a specific accessory. This method is asynchronous and may throw an error. ```swift func requestForwarding(for: ASAccessory) async throws -> ForwardingDecision ``` -------------------------------- ### Accessory Notification Source Name Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification A display name for the bundle or application that sent the notification. This property is required. ```swift let sourceName: String ``` -------------------------------- ### AccessoryNotification.DisplayDate Enumeration Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/displaydate-swift.enum Defines the available options for displaying a date in an accessory notification. ```APIDOC ## AccessoryNotification.DisplayDate ### Description An enumeration representing the options for displaying a date in a notification. ### Cases - **allDayDate(Date)** - An option to display a date for all-day events. - **contentDate(Date)** - An option to display a date that includes a specific moment to which the notification refers. - **deliveryDate** - An option to display a date that uses the notification’s delivery timestamp. - **hideDate** - An option that indicates the accessory doesn’t display a date. ### Conforms To - Decodable - Encodable - Equatable ``` -------------------------------- ### AccessoryNotification.sourceIdentifier Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/identifier-swift.struct/sourceidentifier Retrieves the bundle identifier of the application that originated the notification. ```APIDOC ## Property: sourceIdentifier ### Description The source app’s bundle identifier. If Messages is the app that sends the notification, the value of this property is `com.apple.MobileSMS`. ### Type `String` ### Availability - iOS 26.5+ Beta - iPadOS 26.5+ Beta ### See Also - `notificationIdentifier` (String): An identifier that the source app sets for the notification. ``` -------------------------------- ### Accessory Notification Action Structure Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification Defines a possible user interaction with a notification, such as a button action. This structure is nested within AccessoryNotification. ```swift struct Action ``` -------------------------------- ### AccessoryNotification Actions Property Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/actions Defines an array of possible interactions for a notification. Requires iOS 26.5+ Beta or iPadOS 26.5+ Beta. ```swift let actions: [AccessoryNotification.Action] ``` -------------------------------- ### Define AccessoryError.unableToGetUserResponse Source: https://developer.apple.com/documentation/accessorynotifications/accessoryerror/invalidnotificationresponse This case indicates that the system is unable to handle a user's notification response. This is a related error type within the response errors category. ```swift case unableToGetUserResponse ``` -------------------------------- ### Indicate Notification Sound Source: https://developer.apple.com/documentation/accessorynotifications/alertingcontext Indicates that this alert may play a sound. If this property is nil, it means there is no sound associated with the alert. ```swift var sound: AlertingContext.Sound? ``` -------------------------------- ### AccessoryNotification.DisplayDate - Swift Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/deliverydate Represents preferred date and format for displaying notifications. This is an enum with options for date display. Available in Beta. ```swift let displayDate: AccessoryNotification.DisplayDate ``` -------------------------------- ### AccessoryNotification.DisplayDate.deliveryDate Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/displaydate-swift.enum/contentdate%28_%3A%29 Use this case to display the notification's delivery timestamp. No parameters are required. ```swift case deliveryDate ``` -------------------------------- ### AccessoryNotificationCenter - forwardingStatus(for:) Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotificationcenter/forwardingstatus%28for%3A%29 This method determines the forwarding decision for a given accessory. It is available for iOS and iPadOS versions 26.5 and later, and is currently in beta. ```APIDOC ## `forwardingStatus(for:)` ### Description Determines the forwarding decision for a given accessory. ### Method `async throws` ### Endpoint N/A (Instance Method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```swift func forwardingStatus(for accessory: ASAccessory) async throws -> ForwardingDecision ``` ### Response #### Success Response (200) - **ForwardingDecision** (enum) - The decision regarding forwarding. #### Response Example ```swift // Example of a ForwardingDecision enum case (actual values may vary) let decision: ForwardingDecision = .allow ``` ### Beta Software Notice This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software. ``` -------------------------------- ### Define AccessoryNotification.DisplayDate Enum Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/displaydate-swift.enum Defines the enumeration for display date options in accessory notifications. Use this to specify how dates should be presented. ```swift enum DisplayDate ``` -------------------------------- ### AccessoryNotification.Attributes.priority Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/attributes-swift.struct/priority Defines the priority attribute for an accessory notification. ```APIDOC ## AccessoryNotification.Attributes.priority ### Description An attribute that indicates a priority notification. ### Availability - iOS 26.5+ Beta - iPadOS 26.5+ Beta ### Declaration `static let priority: AccessoryNotification.Attributes` ### See Also - `static let critical: AccessoryNotification.Attributes` (Indicates a critical notification) - `static let timeSensitive: AccessoryNotification.Attributes` (Indicates a time-sensitive notification) ``` -------------------------------- ### AccessoryNotification summary property declaration Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/body Defines an Apple Intelligence summary for the notification as an optional NSAttributedString. ```swift let summary: NSAttributedString? ``` -------------------------------- ### Define dismiss Action Type Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/action/actiontype/textinput%28placeholder%3A%29 Use this case to define an action type that dismisses a notification. This is a beta feature. ```swift case dismiss ``` -------------------------------- ### Accessory Notification Attributes Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification A set of attributes that indicate the notification's priority level. This property is required. ```swift let attributes: AccessoryNotification.Attributes ``` -------------------------------- ### Send Curated Notification Data Source: https://developer.apple.com/documentation/accessorynotifications Use this method within your extension to send curated notification data to the system. The system encrypts this data using keys provided through your app's `AccessoryTransportSecurity` extension. ```swift session.sendMessage(_:) ``` -------------------------------- ### AccessoryNotification.Attributes Structure Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/attributes-swift.struct Defines the structure for AccessoryNotification.Attributes, used for customizing notification priority and appearance. ```APIDOC ## AccessoryNotification.Attributes ### Description Attributes that display priority for a notification. ### Structure ```swift struct Attributes ``` ### Overview Use these attributes to change the visual appearance of and add information about your notification. For guidance on whether to alert for a notification, see `AlertingContext`. ### Topics #### Identifying attribute types - `static let critical: AccessoryNotification.Attributes` An attribute that indicates a critical notification. - `static let priority: AccessoryNotification.Attributes` An attribute that indicates a priority notification. - `static let timeSensitive: AccessoryNotification.Attributes` An attribute that indicates a time-sensitive notification. ### Relationships #### Conforms To - `Decodable` - `Encodable` - `Equatable` - `ExpressibleByArrayLiteral` - `OptionSet` - `RawRepresentable` - `SetAlgebra` ### See Also #### Working with notification attributes - `let attributes: AccessoryNotification.Attributes` A set of attributes that indicate the notification’s priority level. ``` -------------------------------- ### AccessoryNotification.DisplayDate.deliveryDate Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/displaydate-swift.enum/deliverydate An option to display a date that uses the notification’s delivery timestamp. ```APIDOC ## AccessoryNotification.DisplayDate.deliveryDate ### Description An option to display a date that uses the notification’s delivery timestamp. Display this date with information that specifies the minute. ### Availability - iOS 26.5+ Beta - iPadOS 26.5+ Beta ### Definition ```swift case deliveryDate ``` ``` -------------------------------- ### AccessoryNotification subtitle property declaration Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/body Defines the secondary text for the notification. ```swift let subtitle: String? ``` -------------------------------- ### Accessory Notification Attributes Structure Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification Defines attributes that indicate the notification's priority level. This structure is nested within AccessoryNotification. ```swift struct Attributes ``` -------------------------------- ### AccessoryNotification.deliveryDate Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/deliverydate The deliveryDate property returns a timestamp indicating when the system received the notification. ```APIDOC ## Instance Property ### deliveryDate A timestamp that indicates when the system received the notification. * iOS 26.5+Beta * iPadOS 26.5+Beta ```swift let deliveryDate: Date ``` ``` -------------------------------- ### AccessoryNotification.sourceIdentifier Property Declaration Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/identifier-swift.struct/sourceidentifier Defines the sourceIdentifier property as a String representing the bundle identifier of the originating app. ```swift let sourceIdentifier: String ``` -------------------------------- ### AccessoryNotification Related Media Properties Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/contexticon Additional properties for accessing media attachments and source icons associated with a notification. ```swift let attachments: [AccessoryNotification.File] ``` ```swift let sourceIcon: AccessoryNotification.File? ``` -------------------------------- ### AccessoryNotification Actions Property Source: https://developer.apple.com/documentation/accessorynotifications/accessorynotification/actions The 'actions' property represents an array of possible interactions a user can have with a notification. ```APIDOC ## Instance Property ### actions An array of possible interactions that a person can have with the notification. * iOS 26.5+ Beta * iPadOS 26.5+ Beta ```swift let actions: [AccessoryNotification.Action] ``` ### Mentioned in * Receiving iOS notifications on an accessory ### See Also * Handling user interactions * `struct Action` - A possible user interaction with a notification. ``` -------------------------------- ### Declare AccessoryNotificationCenter Source: https://developer.apple.com/documentation/AccessoryNotifications/AccessoryNotificationCenter Declare the AccessoryNotificationCenter class. This is the primary class for managing notification forwarding. ```swift class AccessoryNotificationCenter ```