<!--
{
  "availability" : [
    "macOS: 10.8.0 - 11.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSUserNotification/soundName",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSUserNotification(py)soundName"
  },
  "title" : "soundName"
}
-->

# soundName

Specifies the name of the sound to play when the notification is delivered.

```
var soundName: String? { get set }
```

## Discussion

Passing the [`NSUserNotificationDefaultSoundName`](/documentation/Foundation/NSUserNotificationDefaultSoundName) constant causes the default notification center sound to be played.

A value of `nil` means no sound is played.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)