//
//  AppDelegate.swift
//  playbtest
//
//  Created by 忆海16 on 2024/11/5.
//

import UIKit
import AppLovinSDK

@main
class AppDelegate: UIResponder, UIApplicationDelegate {
    static var shared: AppDelegate {
        return UIApplication.shared.delegate as! AppDelegate
    }
    var window:UIWindow?
    
    func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

        
        window  = UIWindow()
        window?.frame = UIScreen.main.bounds
        let vc = YL_PlayVC()
        
        window?.rootViewController = UINavigationController(rootViewController: vc)
        
        BbbAdManager.shared.initConfig()
        
        BbbAdManager.shared.initAd()
        

        window?.makeKeyAndVisible()
        
        return true
    }
    
    func applicationWillEnterForeground(_ application: UIApplication) {
        print("应用从后台进入前台")
//        closeWindows.removeADVCByDelayTime(0)
        closeAD.removeADVC(byDelayTime: 0)
        
    }
    
    
}

