<!--
{
  "availability" : [
    "iOS: 26.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AccessoryNotifications",
  "identifier" : "/documentation/AccessoryNotifications/AccessoryNotification/init(identifier:sourceName:deliveryDate:displayDate:title:subtitle:body:threadIdentifier:attributes:summary:actions:sourceIcon:contextIcon:attachments:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Accessory Notifications"
    ],
    "preciseIdentifier" : "s:22AccessoryNotifications0A12NotificationV10identifier10sourceName12deliveryDate07displayH05title8subtitle4body16threadIdentifier10attributes7summary7actions0E4Icon07contextR011attachmentsA2C0N0V_SS10Foundation0H0VAC07DisplayH0OSSSgAYSo18NSAttributedStringCSgAyC10AttributesVA0_SayAC6ActionVGAC4FileVSgA8_SayA7_Gtcfc"
  },
  "title" : "init(identifier:sourceName:deliveryDate:displayDate:title:subtitle:body:threadIdentifier:attributes:summary:actions:sourceIcon:contextIcon:attachments:)"
}
-->

# init(identifier:sourceName:deliveryDate:displayDate:title:subtitle:body:threadIdentifier:attributes:summary:actions:sourceIcon:contextIcon:attachments:)

Initializes an accessory notification.

```
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] = [])
```

## Parameters

`identifier`

A unique identifier for the notification.

`sourceName`

The name of the bundle that sent the notification.

`deliveryDate`

The timestamp when the system received the notification.

`displayDate`

The preferred date and format to display.

`title`

The notification’s primary text.

`subtitle`

The notification’s secondary text.

`body`

The notification’s main content.

`threadIdentifier`

An identifier for grouping related notifications.

`attributes`

The priority attributes for the notification.

`summary`

An Apple Intelligence summary.

`actions`

Possible user interactions.

`sourceIcon`

The source app’s icon.

`contextIcon`

A contextual icon for additional information.

`attachments`

Files sent with the notification.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)