vrtnu-app/vrtnu/vrtnu/vrtnuApp.swift

31 lines
693 B
Swift
Raw Normal View History

2020-09-23 20:28:41 +00:00
//
// vrtnuApp.swift
// vrtnu
//
// Created by Jens Timmerman on 23/09/2020.
//
import SwiftUI
2020-09-24 23:35:12 +00:00
import AVFoundation
2020-09-23 20:28:41 +00:00
@main
struct vrtnuApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
}
2020-09-24 23:35:12 +00:00
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
let audioSession = AVAudioSession.sharedInstance()
do {
try audioSession.setCategory(.playback, mode: .moviePlayback)
}
catch {
print("Setting category to AVAudioSessionCategoryPlayback failed.")
}
return true
}
2020-09-23 20:28:41 +00:00
}