Instance Property

body

The message displayed in the notification alert.

Declaration

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

Discussion

The body text contains the final text that you want to display. If your app is not authorized to display alert-based notifications, this property is ignored.

If you specified two percent symbols (%%) in the message body, the system replaces it with a single percent symbol (%). The system strips all other printf style escape characters from your string prior to display.

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.

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.