使用UILocalNotification播放不在应用程序包中的声音 [英] using a UILocalNotification to play a sound that's not in the app bundle
问题描述
是否可以使用UILocalNotification(或任何外部通知/长期多任务处理)在应用程序之外播放不在主应用程序包中的声音? UILocalNotification的文档说soundName属性必须是主包中文件的名称。我把一个快速的应用程序,一起确认了这一点。
Is it possible to use a UILocalNotification (or any outside notification/long-term multitasking) to play a sound outside an app that's NOT in the main application bundle? Documentation for UILocalNotification says the soundName attribute must be the name of a file in the main bundle. I threw together a quick app that confirms this.
有办法解决这个限制吗?我在想别名的别名,其中别名是在应用程序包中,并指向一个已知的路径在文档文件夹...但我想Documents文件夹不是完全知道。
Is there a way to get around this restriction? I was thinking something with aliases, where the alias is in the app bundle and points to a known path in the Documents folder... but I guess the Documents folder isn't exactly known.
任何想法?
推荐答案
不是在沙盒环境中,不可能。
Not in a sandboxed environment, its not possible.
这篇关于使用UILocalNotification播放不在应用程序包中的声音的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!