AudioServicesPlaySystemSound

 想在锁屏后台播放报警提示音。

添加了UIBackgroundModes,audio,官方审核不通过!

IOS的闹钟是怎么实现的,锁屏不能播放声音?原来是用了notification方法。

http://zhangmingwei.iteye.com/blog/1831378

 

notification.soundName= UILocalNotificationDefaultSoundName;//声音,可以换成alarm.soundName = @"myMusic.caf"

 

 

From Apple
  • 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

 

posted on 2016-03-30 17:33  lypzxy  阅读(888)  评论(0编辑  收藏  举报