NSNotification Custom Sound

Hi All,


I'd like to use a custom sound for Notification Center, but cannot find much documentation on this. I know how to assign a sound to a notification, and I know how to copy new sound files to ~/Library/Sounds then use these new sounds. My app is sandboxed so I of course have to ask the user to confirm they want to install the new sounds, but am concerned about app store rejection based on:


2.15

Apps must be self-contained, single application installation bundles, and cannot install code or resources in shared locations


Anyways, is there a way to use a custom sound with an NSNotification without copying a resource to ~/Library/Sounds ?


Thanks in advance,

Will

I have the same question.


When I try to us a custom sound.

let notification = NSUserNotification()

notification.soundName = "customSoundName" //my notification sound name present in my app bundle
It doesn't work

I am facing the same issue. The custom sound is copied to the app bundle but on setting the notification.soundName, the default sound is getting played.

NSNotification Custom Sound
 
 
Q