ios - 后台音频不适用于模拟器

标签 ios swift audio audiokit

后台音频在设备上完美运行,但在与工作设备具有相同 iOS 版本 (11.4) 的模拟器(不同机器)上运行不佳。

设置:

 AKSettings.playbackWhileMuted = true
 do { try AudioKit.start() } ...

信息.plist:

所需的后台模式 -> App 使用 AirPlay 播放音频或流式传输音频/视频

有什么想法吗?

最佳答案

我的理解是模拟器基本上不支持后台模式。对照:

Play music in the background using AVAudioplayer

How to continue audio playback in background mode

关于ios - 后台音频不适用于模拟器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50737265/

相关文章:

iphone - 该应用程序在 iOS 4.1+ 中崩溃,但在 4.0 中成功运行

ios - Xcode 中的 "Dead Store"警告

json - 如何将服务器数据传递/解析到 WatchKit 表行中的对象?

Swift:从相对于基本 url 的字符串创建 url

ios - 如何在 Swift 中以编程方式创建包含部分的分组 TableView

c# - 如何将音频流式传输到特定的输出设备?

javascript - 如何使用音频元素创建连续的曲调

ios - NSDateFormatter : 12 hour formatted string can't converted in date when system date format is 24 hour in ios

iOS:在第一次启动应用程序时管理数据

python - 使用 python 模块 Pygame 制作简单视频渲染器时遇到问题