fix(ios): don't claim audio session at app launch

The non-mixing playback session was activated in didFinishLaunching,
so merely opening the app stopped other apps' audio. Keep the category
configuration; playback start activates the session.
This commit is contained in:
edde746
2026-07-07 08:55:26 +02:00
parent 94852e49cb
commit 574b8d524f
+3 -2
View File
@@ -14,11 +14,12 @@ import MediaPlayer
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
// Configure audio session for media playback
// Configure audio session for media playback. Not activated here: the
// session is non-mixing, so activation stops other apps' audio it is
// claimed when playback actually starts.
do {
let session = AVAudioSession.sharedInstance()
try session.setCategory(.playback, mode: .default)
try session.setActive(true)
} catch {
print("Failed to configure audio session: \(error)")
}