From 866318c73f5710d162b2a8e72fee0514b8339098 Mon Sep 17 00:00:00 2001 From: "Mr.zhou" <1422157428@qq.com> Date: Tue, 11 Jun 2024 12:00:19 +0800 Subject: [PATCH] =?UTF-8?q?B=E9=9D=A21.0.6=E8=93=9D=E7=89=99=E6=92=AD?= =?UTF-8?q?=E6=94=BE=E7=9A=84=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- relax.offline.mp3.music/AppDelegate.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relax.offline.mp3.music/AppDelegate.swift b/relax.offline.mp3.music/AppDelegate.swift index 75e7b37..9cdfbd4 100644 --- a/relax.offline.mp3.music/AppDelegate.swift +++ b/relax.offline.mp3.music/AppDelegate.swift @@ -47,7 +47,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { let session = AVAudioSession.sharedInstance() do { //允许后台活跃,播放以及记录 - try session.setCategory(.playAndRecord, mode: .default, options: [.allowAirPlay, .defaultToSpeaker]) + try session.setCategory(.playAndRecord, mode: .default, options: [.allowAirPlay, .defaultToSpeaker, .allowBluetooth]) //激活会话 try session.setActive(true) try session.overrideOutputAudioPort(.speaker)