gpt4 book ai didi

ios - 为什么 iOS 上的后台录音不起作用?

转载 作者:行者123 更新时间:2023-11-29 02:52:26 29 4
gpt4 key购买 nike

我正在尝试让我的录音机在 iOS 的后台运行。

我尝试设置后台模式“音频”以防止我的应用程序在进入后台模式时被挂起,但这似乎不起作用。我是通过关注 Implementing Long-Running Background Tasks 做到的> 播放和录制背景音频,声明

You enable audio support from the Background modes section of the Capabilities tab in your Xcode project. (You can also enable this support by including the UIBackgroundModes key with the audio value in your app’s Info.plist file.)

问题是,当我的应用进入后台时,只会录制大约一秒钟的音频。该应用程序似乎此后被暂停。我通过模拟主页按钮按下在模拟器上对此进行测试。

如何让应用在后台录制?

最佳答案

模拟器上的音频播放应用程序表现出与您针对录音应用程序描述的相同症状。一般来说,后台任务在模拟器和设备上的行为方式不同。

尝试在设备上测试应用。

关于ios - 为什么 iOS 上的后台录音不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24343976/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com