AppleAlert interface
Represents what is in the APNs alert body.
Properties
| body | The content of the alert message. |
| launch-image | The name of the launch image file to display. If the user chooses to launch your app, the contents of the specified image or storyboard file are displayed instead of your app’s normal launch image. |
| loc-args | An array of strings containing replacement values for variables in your message text. Each %@ character in the string specified by loc-key is replaced by a value from this array. The first item in the array replaces the first instance of the %@ character in the string, the second item replaces the second instance, and so on. |
| loc-key | The key for a localized message string. Use this key, instead of the body key, to retrieve the message text from your app’s Localizable.strings file. The value must contain the name of a key in your strings file. |
| subtitle | Additional information that explains the purpose of the notification. |
| subtitle-loc-args | An array of strings containing replacement values for variables in your title string. Each %@ character in the string specified by subtitle-loc-key is replaced by a value from this array. The first item in the array replaces the first instance of the %@ character in the string, the second item replaces the second instance, and so on. |
| subtitle-loc-key | The key for a localized subtitle string. Use this key, instead of the subtitle key, to retrieve the subtitle from your app’s Localizable.strings file. The value must contain the name of a key in your strings file. |
| title | The title of the notification. Apple Watch displays this string in the short look notification interface. Specify a string that’s quickly understood by the user. |
| title-loc-args | An array of strings containing replacement values for variables in your title string. Each %@ character in the string specified by the title-loc-key is replaced by a value from this array. The first item in the array replaces the first instance of the %@ character in the string, the second item replaces the second instance, and so on. |
| title-loc-key | The key for a localized title string. Specify this key instead of the title key to retrieve the title from your app’s Localizable.strings files. The value must contain the name of a key in your strings file. |
Property Details
body
The content of the alert message.
body?: string
Property Value
string
launch-image
The name of the launch image file to display. If the user chooses to launch your app, the contents of the specified image or storyboard file are displayed instead of your app’s normal launch image.
launch-image?: string
Property Value
string
loc-args
An array of strings containing replacement values for variables in your message text. Each %@ character in the string specified by loc-key is replaced by a value from this array. The first item in the array replaces the first instance of the %@ character in the string, the second item replaces the second instance, and so on.
loc-args?: string[]
Property Value
string[]
loc-key
The key for a localized message string. Use this key, instead of the body key, to retrieve the message text from your app’s Localizable.strings file. The value must contain the name of a key in your strings file.
loc-key?: string
Property Value
string
subtitle
Additional information that explains the purpose of the notification.
subtitle?: string
Property Value
string
subtitle-loc-args
An array of strings containing replacement values for variables in your title string. Each %@ character in the string specified by subtitle-loc-key is replaced by a value from this array. The first item in the array replaces the first instance of the %@ character in the string, the second item replaces the second instance, and so on.
subtitle-loc-args?: string[]
Property Value
string[]
subtitle-loc-key
The key for a localized subtitle string. Use this key, instead of the subtitle key, to retrieve the subtitle from your app’s Localizable.strings file. The value must contain the name of a key in your strings file.
subtitle-loc-key?: string
Property Value
string
title
The title of the notification. Apple Watch displays this string in the short look notification interface. Specify a string that’s quickly understood by the user.
title?: string
Property Value
string
title-loc-args
An array of strings containing replacement values for variables in your title string. Each %@ character in the string specified by the title-loc-key is replaced by a value from this array. The first item in the array replaces the first instance of the %@ character in the string, the second item replaces the second instance, and so on.
title-loc-args?: string[]
Property Value
string[]
title-loc-key
The key for a localized title string. Specify this key instead of the title key to retrieve the title from your app’s Localizable.strings files. The value must contain the name of a key in your strings file.
title-loc-key?: string
Property Value
string