27 lines
527 B
Swift
27 lines
527 B
Swift
import AVFoundation
|
|
import SwiftUI
|
|
|
|
@main
|
|
struct mlbIOSApp: App {
|
|
@State private var viewModel = GamesViewModel()
|
|
|
|
init() {
|
|
configureAudioSession()
|
|
}
|
|
|
|
var body: some Scene {
|
|
WindowGroup {
|
|
mlbIOSRootView()
|
|
.environment(viewModel)
|
|
}
|
|
}
|
|
|
|
private func configureAudioSession() {
|
|
do {
|
|
try AVAudioSession.sharedInstance().setCategory(.ambient)
|
|
} catch {
|
|
print("Failed to set audio session: \(error)")
|
|
}
|
|
}
|
|
}
|