Instance Property


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


@NSCopying var badge: NSNumber? { get }


When the number in this property is 0, the system does not display a badge. When the number is greater than 0, the system displays the badge with the specified number. When the value in this property is nil, the system leaves the current badge unchanged.

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 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 userInfo: [AnyHashable : Any]

A dictionary of custom information associated with the notification.

var attachments: [UNNotificationAttachment]

An array of attachments to display with the notification.