Instance Property

sound

The sound to play when the notification is delivered.

Declaration

iOS, Mac Catalyst, watchOS
@property(readonly, copy, nonatomic) UNNotificationSound *sound;
macOS
@property(readonly, copy, atomic) UNNotificationSound *sound;

Discussion

Notifications can play a default sound or a custom sound. For information on how to specify custom sounds for your notifications, see UNNotificationSound.

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.

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.

attachments

An array of attachments to display with the notification.