The sound to play when the notification is delivered.
SDKs
- iOS 10.0+
- macOS 10.14+
- Mac Catalyst 13.0+
- watchOS 3.0+
Framework
- User
Notifications
Declaration
@NSCopying var sound: UNNotification Sound? { get set }
Discussion
Use this property to specify the sound that you want played when the notification arrives. If your app is not authorized to play sounds for notifications, this property is ignored.
For information on how to specify sounds for your notifications, see UNNotification
.