1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- //
- // AppDelegate.swift
- // TSLiveWallpaper
- //
- // Created by 100Years on 2024/12/19.i
- //
- import GoogleMobileAds
- import UIKit
- @main
- class AppDelegate: UIResponder, UIApplicationDelegate {
- var window: UIWindow?
- func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
- window = UIWindow(frame: UIScreen.main.bounds)
- window?.backgroundColor = UIColor.white
- window?.makeKeyAndVisible()
- initAdMob()
- addNetListener()
- goToTab()
- return true
- }
- func initAdMob() {
- GADMobileAds.sharedInstance().start { status in
- print("启动状态 == status === \(status.adapterStatusesByClassName)")
- }
- }
- func goToTab() {
- window?.rootViewController = TSTabBarController()
- }
- func goToLoadVC() {
- _ = TSImageDataCenter.shared
- window?.rootViewController = TSLaunchVC()
- }
-
- func addNetListener(){
- TSNetworkShard.monitorNetworkPermission { success in
- if success {
- PurchaseManager.default.requestProducts()
- }
- }
- }
- }
- extension AppDelegate {
- }
|