AudioServicesPlaySystemSound
想在锁屏后台播放报警提示音。
添加了UIBackgroundModes,audio,官方审核不通过!
IOS的闹钟是怎么实现的,锁屏不能播放声音?原来是用了notification方法。
http://zhangmingwei.iteye.com/blog/1831378
notification.soundName= UILocalNotificationDefaultSoundName;//声音,可以换成alarm.soundName = @"myMusic.caf"
- 2.16 - Multitasking Apps may only use background services for their intended purposes: VoIP, audio playback, location, task completion, local notifications, etc.
2.16 Details
Your app declares support for audio in the UIBackgroundModes key in your Info.plist but did not include features that require persistent audio.
Specifically, playing an alert or act as an alarm for the hardware is not appropriate for the app to use background audio functionality.
Next Steps
The audio key is intended for use by applications that provide audible content to the user while in the background, such as music player or streaming audio applications.
Please revise your app to provide audible content to the user while the app is in the background or remove the "audio" setting from the UIBackgroundModes key.
Resources
If you have difficulty reproducing a reported issue, please try testing the workflow described in Technical Q&A QA1764: How to reproduce bugs reported against App Store submissions.
If you have code-level questions after utilizing the above resources, you may wish to consult with Apple Developer Technical Support. When the DTS engineer follows up with you, please be ready to provide:
- complete details of your rejection issue(s)
- screenshots
- steps to reproduce the issue(s)
- symbolicated crash logs - if your issue results in a crash log
本文探讨了在iOS设备上实现在锁屏状态下后台播放报警提示音的方法。文章详细记录了作者尝试使用AudioServicesPlaySystemSound遇到的问题及Apple官方审核反馈,并最终通过Notification方法解决了这一难题。
607

被折叠的 条评论
为什么被折叠?



