<!--
{
  "availability" : [
    "iOS: 4.0.0 - 10.0.0",
    "iPadOS: 4.0.0 - 10.0.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "watchOS: 2.0.0 - 3.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UILocalNotification/soundName",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UILocalNotification(py)soundName"
  },
  "title" : "soundName"
}
-->

# soundName

The name of the file containing the sound to play when an alert is displayed.

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

## Discussion

For this property, specify the filename (including extension) of a sound resource in the app’s main bundle or [`UILocalNotificationDefaultSoundName`](/documentation/UIKit/UILocalNotificationDefaultSoundName) to request the default system sound. When the system displays an alert for a local notification or badges an app icon, it plays this sound. The default value is `nil` (no sound). Sounds that last longer than 30 seconds are not supported. If you specify a file with a sound that plays over 30 seconds, the default sound is played instead.

For information on valid sound resources, see [Registering, Scheduling, and Handling User Notifications](https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/IPhoneOSClientImp.html#//apple_ref/doc/uid/TP40008194-CH103) in [Local and Remote Notification Programming Guide](https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/index.html#//apple_ref/doc/uid/TP40008194).

---

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)