Audio playing while app in background iOS

前端 未结 7 914
我寻月下人不归
我寻月下人不归 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:05

    Try this :

    [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryAmbient error:nil];
    

    link

    Try this http://www.sagorin.org/ios-playing-audio-in-background-audio/

提交回复
热议问题