Created
July 11, 2022 02:09
-
-
Save cnnrrss/81762f7119eb228ddce66b18bc7888f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import SwiftUI | |
import Firebase | |
import AVFoundation | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? | |
func application(_ application: UIApplication, | |
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { | |
// Get the singleton instance. | |
let audioSession = AVAudioSession.sharedInstance() | |
do { | |
// Set the audio session category, mode, and options. | |
try audioSession.setCategory(AVAudioSession.Category.playback) | |
} catch { | |
print("Failed to set audio session category.") | |
} | |
// Other post-launch configuration. | |
return true | |
} | |
} | |
struct LaceApp: App { | |
// MARK: - Properties | |
@UIApplicationDelegateAdaptor(AppDelegate.self) var delegate | |
init() { | |
FirebaseApp.configure() | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment