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

IOS AudioServicesPlaySystemSound 后台锁屏播放的更多相关文章

  1. 不会吧,这也行?iOS后台锁屏监听摇一摇

    目录 背景介绍 探索过程 其他 APP 有没有类似功能 系统提供的摇一摇回调能否满足 其他方法能否实现 利用 CoreMotion 框架,监听加速计原始数据 通过加速计监听摇一摇 控制器相关逻辑和代码 ...

  2. AVAudioPlayer的锁屏播放控制和锁屏播放信息显示

    在设置这个锁屏之前,首先得设置应用支持后台音乐播放,TAGETS->Info->Required background modes->App plays audio or strea ...

  3. swift锁屏播放,音乐进度更新,专辑,歌手名显示

    我自己用的音乐播放器是自带的AVPlayer 导入头文件#import <MediaPlayer/MediaPlayer.h> 远程控制事件接收与处理- (void)viewWillApp ...

  4. iOS 13 绕过锁屏密码漏洞

    iOS 13 很快就要发布了,在未正式发布之前,西班牙的安全研究员 Jose Rodriguez 公开了一个漏洞,能够查绕过锁屏密码查看通讯录.照片.短信. 在 iOS 设备上,当屏幕锁定时,用户无法 ...

  5. HTML5新标签video在iOS上默认全屏播放

    今天做一个app时发现一个问题,应用html5中的video标签加载视频,在Android手机上默认播放大小,但是换成iPhone手机上出问题了,默认弹出全屏播放,查找了好多论坛,都没有谈论这个的.然 ...

  6. iOS 关闭自动锁屏

    [UIApplication sharedApplication].idleTimerDisabled=YES;// 不自动锁屏 [UIApplication sharedApplication].i ...

  7. html-----vedio标签(HTML5新标签VIDEO在IOS上默认全屏播放)

    今天做一个app时发现一个问题,应用html5中的video标签加载视频,在Android手机上默认播放大小,但是换成iPhone手机上出问题了,默认弹出全屏播放,查找了好多论坛,都没有谈论这个的.然 ...

  8. video 安卓ios系统 浏览器 全屏播放以及自动播放的问题

    ios自动播放 <body onload="load()"> <div class="result_box"> <div clas ...

  9. Delphi IOS 蓝牙锁屏后台运行

    Delphi IOS 后台运行 同样的程序,编译成android,锁屏后继续运行正常,蓝牙通讯正常,但在IOS下锁屏后程序的蓝牙就中断通讯了? IOS的机制就是这样,锁屏就关闭了. 音乐播放器是怎么做 ...

随机推荐

  1. HDU-1532 Drainage Ditches (最大流,EK算法模板)

    题目大意:最大流的模板题...源点是0,汇点是n-1. 代码如下: # include<iostream> # include<cstdio> # include<cma ...

  2. hrbust 1621 迷宫问题II 广搜

    题目链接:http://acm.hrbust.edu.cn/vj/index.php?/vj/index.php?c=&c=contest-contest&cid=134#proble ...

  3. java垃圾回收期如何工作(编程思想)

    垃圾回收器如何工作: 在以前的程序语言中,在堆上分配对象的代价十分昂贵,因此读者会自然觉得对Java中所有对象(基本类型除外)都在堆上分配的方式也非常高昂.然而,垃圾回收期对提高对象的创建速度,却具有 ...

  4. java中break,continue,标签实现goto效果(编程思想)

    goto 编程语言中一开始就有goto关键词了.事实上,goto起源于汇编语言的程序控制:“若条件A成立,则调到这里:否则跳到那里”. goto语句时在源码级别上的跳转,这导致了其不好的名誉.于是go ...

  5. Monkey测试准备工作

    1.下载Android SDK 2.打开SDK Manager.exe自动下载 3.配置环境变量 将platform-tools的路径(如: C:\001myWorkspace\eclipse(MAV ...

  6. 数据库数据——>文件xml

    xml文件格式 <smss> <sms> <data> </data> </sms> </smss> 这里面的意思是将数据库里面 ...

  7. lambda,reduce,filter用法

    1.lambda的用法 sum = lambda arg1,arg2:arg1+arg2 sum(10,20) --->30 | | 实际上是def sum(arg1,arg2) return ...

  8. C#中系统时间和UNIX时间戳互相转换

    在项目开发过程中,有时会遇到不同程序之间相互调用数据,数据中不免会包含时间,比如ASP.NET调用PHP,牵扯到时间就要做一下处理,PHP程序中一般存取的都是UNIX时间,不像ASP.NET存储的是年 ...

  9. POI2010题解

    POI2010题解 我也不知道我为什么就开始刷POI了 有些题目咕掉了所以不完整(我都不知道POI到底有多少题) [BZOJ2079][Poi2010]Guilds (貌似bz跟洛谷上的不是一个题?) ...

  10. Trie树学习1

    Trie树.也称为字典数,前缀树,每一个单词的每一个字母依照顺序相应一个节点.有重合的前缀就共享节点. 理想情况下(满的情况).假若全部的单词都是N长,则树共同拥有N层,每层都是26个子节点. 在程序 ...