Instance Property


A dictionary of custom information associated with the notification.


var userInfo: [AnyHashable : Any] { get }


For remote notifications, this property contains the entire notification payload. For local notifications, you configure the property directly before scheduling the notification.

The keys in this dictionary must be property-list types—that is, they must be types that can be serialized into the property-list format. For information about property-list types, see Property List Programming Guide.

See Also

Getting the Notification Data

var title: String

A short description of the reason for the alert.

var subtitle: String

A secondary description of the reason for the alert.

var body: String

The message displayed in the notification alert.

var badge: NSNumber?

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

var sound: UNNotificationSound?

The sound to play when the notification is delivered.

var launchImageName: String

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

var attachments: [UNNotificationAttachment]

An array of attachments to display with the notification.

Beta Software

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