1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- //
- // AppDelegate.swift
- // JiaPeiManage
- //
- // Created by Ning.ge on 2023/6/12.
- //
- import UIKit
- @main
- class AppDelegate: UIResponder, UIApplicationDelegate {
- // MARK: Properties
-
- var dependency: NYAppDependency!
-
- // MARK: UI
-
- var window: UIWindow?
- // MARK: UIApplicationDelegate
- func application(_ application:UIApplication, didFinishLaunchingWithOptions launchOptions:[UIApplication.LaunchOptionsKey: Any]?) -> Bool {
-
- self.dependency = self.dependency ?? CompositionRoot.resolve()
- self.window = self.dependency.window
- self.dependency.configureSDKs()
- self.dependency.configureAppearance()
- self.dependency.configureUserAgent()
- self.dependency.congigurePerformance()
- LocalManager.autoLogin()
- // 设置状态栏颜色
- UIApplication.shared.statusBarStyle = .lightContent
- return true
- }
-
- func applicationDidBecomeActive(_ application: UIApplication) {
- let idfa = NYIDFA.getIDFA()
- }
-
- func application(
- _ app: UIApplication,
- open url: URL,
- options: [UIApplication.OpenURLOptionsKey: Any] = [:]
- ) -> Bool {
- NYWXApiManager.shared.handleOpenUrl(url: url)
- return self.dependency.openURL(url, options)
- }
- // For Universal Link
- func application(_ application: UIApplication, continue userActivity: NSUserActivity, restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool {
- return NYWXApiManager.shared.handleOpenUniversalLink(userActivity: userActivity)
- }
- }
|