zoukankan      html  css  js  c++  java
  • IOS AudioServicesPlaySystemSound 后台锁屏播放

    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

  • 相关阅读:
    javascript实战演练,制作新按钮,‘新窗口打开网站’,点击打开新窗
    P1332 血色先锋队
    P4643 [国家集训队]阿狸和桃子的游戏
    T149876 公约数
    P1462 通往奥格瑞玛的道路
    P1083 借教室
    Tribles UVA
    Fence Repair POJ
    Crossing Rivers
    关于一轮
  • 原文地址:https://www.cnblogs.com/cb168/p/5338098.html
Copyright © 2011-2022 走看看