topon_playb/PlayBTopOn/AppDelegate.swift
2025-08-06 16:04:31 +08:00

42 lines
1.0 KiB
Swift

//
// AppDelegate.swift
// PlayBTopOn
//
// Created by 16 on 2024/11/15.
//
import UIKit
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
static var shared: AppDelegate {
return UIApplication.shared.delegate as! AppDelegate
}
static let appid = UUID().uuidString
var window:UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
window = UIWindow()
window?.frame = UIScreen.main.bounds
NSLog("XS- app start:\(AppDelegate.appid)")
let vc = YL_PlayVC()
window?.rootViewController = UINavigationController(rootViewController: vc)
BbbAdManager.shared.initConfig()
BbbAdManager.shared.initAd()
window?.makeKeyAndVisible()
return true
}
func applicationWillEnterForeground(_ application: UIApplication) {
print("应用从后台进入前台")
BbbAdManager.shared.closeAd(v: 0);
}
}