macOS cannot use custom UNNotificationSounds ?

Hello,

The documentation states that one can add a custom sound to User Notifications.

This works on iOS, but doesn't appear to work on macOS.

Am I holding it wrong, or are the docs wrong? https://developer.apple.com/documentation/usernotifications/unnotificationsound

Example minimal project to demo is here: https://github.com/Diggory/macOSLocalNotifications

Thanks.

  • FYI, this is on Monterey 12.6

  • As this appears to be a bug (to me), I have filed a Radar. (FB11642483)

  • I've updated the sample app with multiple sounds, in multiple formats. None of them appears to work. Except one MP3 (very odd) - note not any MP3, just this one.

Add a Comment

Accepted Reply

After some great detective work from another developer it seems that the issue is caused by the "Play user interface sound effects" option in the 'Sound Effects' section of the 'Sound' System Preferences pane.

I had to turn that option off, delete my app, reboot, then re-enable that option and the custom sounds now work. The .caf files still don't work, but that can be worked around.

Replies

After some great detective work from another developer it seems that the issue is caused by the "Play user interface sound effects" option in the 'Sound Effects' section of the 'Sound' System Preferences pane.

I had to turn that option off, delete my app, reboot, then re-enable that option and the custom sounds now work. The .caf files still don't work, but that can be worked around.