using a UILocalNotification to play a sound that's not in the app bundle

让人想犯罪 __ 提交于 2019-12-12 17:34:32

问题


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.

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.

Any ideas?


回答1:


Not in a sandboxed environment, its not possible.



来源:https://stackoverflow.com/questions/4611417/using-a-uilocalnotification-to-play-a-sound-thats-not-in-the-app-bundle

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