Get the soundName by soundID to assign it to a UILocalNotification

心已入冬 提交于 2019-12-02 11:40:34

Description of soundName in UILocalNotification Class Reference mentions

For this property, specify the filename (including extension) of a sound resource in the app’s main bundle or UILocalNotificationDefaultSoundName to request the default system sound.

So if you want the default local notification sound use UILocalNotificationDefaultSoundName.

Also, a note from Multimedia Programming Guide

Note: System-supplied alert sounds and system-supplied user-interface sound effects are not available to your application.

So you cannot use any system sound id you find in iOSSystemSoundsLibrary for this.

If you want a custom sound, you'll have to provide your own.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!