UILocalNotification从应用程序文档播放声音

Lig*_*ght 5 cocoa-touch objective-c ios uilocalnotification

我知道只UILocalNotification支持soundName应用程序包,但我看到程序在通知中播放录制的声音,即使程序已关闭.怎么实现呢?任何想法对我来说都很重要..

Max*_*kin 1

我检查了 ios 5.0.1 上的下一个方法:

只需像这样设置相对路径

notify.soundName = @"../Documents/blabla.caf"
Run Code Online (Sandbox Code Playgroud)