Skip to content

Commit

Permalink
Update with session mode fix
Browse files Browse the repository at this point in the history
This closes #607
  • Loading branch information
yamadapc committed Jan 15, 2024
1 parent ea5f1da commit 36bb3b0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions crates/apps/metronome/ios/Runner/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
import UIKit
import Flutter
import AVFAudio

func configureAudioSession() {
let audioSession = AVAudioSession.sharedInstance()
do {
// Set the audio session category and mode.
try audioSession.setCategory(.playback, mode: .default, options: [.mixWithOthers])
} catch {
print("Failed to set the audio session configuration")
}
}

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
Expand All @@ -9,6 +20,9 @@ import Flutter
) -> Bool {
let value = dummy_method_to_enforce_bundling()
print(value)

configureAudioSession()

GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
Expand Down

0 comments on commit 36bb3b0

Please sign in to comment.