Instance Property

attachments

An array of attachments to display with the notification.

Declaration

iOS, Mac Catalyst, watchOS
@property(readonly, copy, nonatomic) NSArray<UNNotificationAttachment *> *attachments;
macOS
@property(readonly, copy, atomic) NSArray<UNNotificationAttachment *> *attachments;

Discussion

Use this property to retrieve the images, movies, and audio files associated with your notification’s content. A notification content app extension might use these values to add the associated content to its view controller.

See Also

Getting the Notification Data

title

A short description of the reason for the alert.

subtitle

A secondary description of the reason for the alert.

body

The message displayed in the notification alert.

badge

The number to display as the app’s icon badge.

sound

The sound to play when the notification is delivered.

launchImageName

The name of the launch image to display when your app is launched in response to the notification

userInfo

A dictionary of custom information associated with the notification.