Background mode is not enabled in iOS tests

余生颓废 提交于 2020-01-14 15:59:13

问题


I'm writing a Swift library which in turn uses the AudioKit library as a dependency. When using AudioKit in iOS, you'll have to enable 'Background Mode' in the capabilities section in project settings. But when running iOS tests, there's no place for such configuration and as a result you're confronted with this error:

CheckError Error: kMIDINotPermitted: Have you enabled the audio background mode > in your ios app?

I tried adding the corresponding "Required background modes" entry to the plist file for both the library and the test file to no avail. Perhaps the testing code for AudioKit can shed some light? Thanks.


回答1:


I found the solution:

Enable background audio in the "Capabilities" tab for your project, under "Background Modes."

Reference



来源:https://stackoverflow.com/questions/46900535/background-mode-is-not-enabled-in-ios-tests

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!