Access built-in iOS alarm clock sound in my app

落爺英雄遲暮 提交于 2019-11-28 06:00:23

问题


I'm building a countdown timer app, and wondering if I can access the list of sound clips in the built-in clock app, or do I have to create my own sound clip?


回答1:


Your app runs in a sandboxed environment, so accessing anything outside that sandbox is not possible. You will need to include your own sounds in your application bundle and access them that way.




回答2:


If you're using the sound in a notifications try :

notification.soundName = UILocalNotificationDefaultSoundName;


来源:https://stackoverflow.com/questions/9524032/access-built-in-ios-alarm-clock-sound-in-my-app

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