Struct iOSNotificationSettings
iOSNotificationSettings contains the current authorization status and notification-related settings for your app. Your app must receive authorization to schedule notifications.
Inherited Members
Namespace: Unity.Notifications.iOS
Assembly: Unity.Notifications.iOS.dll
Syntax
public struct iOSNotificationSettings
Remarks
Use this struct to determine what notification-related actions your app is allowed to perform by the user. This information should be used to enable, disable, or adjust your app's notification-related behaviors. The system enforces your app's settings by preventing denied interactions from occurring.
Properties
AlertSetting
The authorization status for displaying alerts.
Declaration
public NotificationSetting AlertSetting { get; }
Property Value
Type | Description |
---|---|
NotificationSetting |
AlertStyle
The type of alert that the app may display when the device is unlocked.
Declaration
public AlertStyle AlertStyle { get; }
Property Value
Type | Description |
---|---|
AlertStyle |
Remarks
This property specifies the presentation style for alerts when the device is unlocked. The user may choose to display alerts as automatically disappearing banners or as modal windows that require explicit dismissal (the user may also choose not to display alerts at all.
AuthorizationStatus
When the value is set to Authorized your app is allowed to schedule and receive local and remote notifications.
Declaration
public AuthorizationStatus AuthorizationStatus { get; }
Property Value
Type | Description |
---|---|
AuthorizationStatus |
Remarks
When authorized, use the alertSetting, badgeSetting, and soundSetting properties to specify which types of interactions are allowed.
When the AuthorizationStatus
value is Denied
, the system doesn't deliver notifications to your app, and the system ignores any attempts to schedule local notifications.
BadgeSetting
The authorization status for badging your app’s icon.
Declaration
public NotificationSetting BadgeSetting { get; }
Property Value
Type | Description |
---|---|
NotificationSetting |
CarPlaySetting
The setting that indicates whether your app’s notifications may be displayed in a CarPlay environment.
Declaration
public NotificationSetting CarPlaySetting { get; }
Property Value
Type | Description |
---|---|
NotificationSetting |
LockScreenSetting
The setting that indicates whether your app’s notifications appear onscreen when the device is locked.
Declaration
public NotificationSetting LockScreenSetting { get; }
Property Value
Type | Description |
---|---|
NotificationSetting |
NotificationCenterSetting
The setting that indicates whether your app’s notifications are displayed in Notification Center.
Declaration
public NotificationSetting NotificationCenterSetting { get; }
Property Value
Type | Description |
---|---|
NotificationSetting |
ShowPreviewsSetting
The setting that indicates whether the app shows a preview of the notification's content.
Declaration
public ShowPreviewsSetting ShowPreviewsSetting { get; }
Property Value
Type | Description |
---|---|
ShowPreviewsSetting |
SoundSetting
The authorization status for playing sounds for incoming notifications.
Declaration
public NotificationSetting SoundSetting { get; }
Property Value
Type | Description |
---|---|
NotificationSetting |