// // SodaLiveApp.swift // SodaLive // // Created by klaus on 2023/08/09. // import SwiftUI import AppTrackingTransparency import FBSDKCoreKit @main struct SodaLiveApp: App { @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate var body: some Scene { WindowGroup { ContentView() .onReceive(NotificationCenter.default.publisher(for: UIApplication.didEnterBackgroundNotification)) { _ in CreatorCommunityMediaPlayerManager.shared.pauseContent() } .onReceive(NotificationCenter.default.publisher(for: UIApplication.didBecomeActiveNotification)) { _ in UIApplication.shared.applicationIconBadgeNumber = 0 ATTrackingManager.requestTrackingAuthorization { _ in } } .onOpenURL { url in DEBUG_LOG("I have received a URL through a custom scheme! \(url.absoluteString)") ApplicationDelegate.shared.application(UIApplication.shared, open: url, options: [:]) } } } }