Instance Property

title

A short description of the reason for the alert.

Declaration

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

Discussion

When a title is present, the system attempts to display a notification alert. If your app is not authorized to display alert-based notifications, this property is ignored.

Title strings should be short, usually only a couple of words describing the reason for the notification. In watchOS, the title string is displayed as part of the short look notification interface, which has limited space.

See Also

Getting the Notification Data

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.

attachments

An array of attachments to display with the notification.