Instance Property

soundSetting

The authorization status for playing sounds for incoming notifications.

Declaration

iOS, Mac Catalyst, watchOS
@property(readonly, nonatomic) UNNotificationSetting soundSetting;
macOS
@property(readonly, atomic) UNNotificationSetting soundSetting;

Discussion

When the value of this property is UNNotificationSettingEnabled, the app is authorized to play sounds. The system tries to play a sound when the sound property of the UNNotificationContent object contains a value, or when the aps dictionary in a remote notification contains the sound key.

See Also

Getting Device-Specific Settings

notificationCenterSetting

The setting that indicates whether your app’s notifications are displayed in Notification Center.

lockScreenSetting

The setting that indicates whether your app’s notifications appear onscreen when the device is locked.

carPlaySetting

The setting that indicates whether your app’s notifications may be displayed in a CarPlay environment.

alertSetting

The authorization status for displaying alerts.

badgeSetting

The authorization status for badging your app’s icon.

criticalAlertSetting

The authorization status to play sounds for critical alerts.

UNNotificationSetting

Constants indicating the current status of a notification setting.