Audio playing while app in background iOS

前端 未结 7 898
我寻月下人不归
我寻月下人不归 2021-02-05 17:19

I have an app mostly based around Core Bluetooth. When something specific happens, the app is woken up using Core Bluetooth background modes and it fires off an alarm, however I

7条回答
  •  别那么骄傲
    2021-02-05 18:13

    Apple has a nice Technical Q&A article about this in its documentation (see also Playing and Recording Background Audio).

    I think one big thing missing is that you haven't activated the Audio Background Mode in the Xcode settings: enter image description here

    Maybe also adding [self.player prepareToPlay] in your alert method is helpful.

提交回复
热议问题