AppDelegate.swift 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // AppDelegate.swift
  3. // JiaPeiManage
  4. //
  5. // Created by Ning.ge on 2023/6/12.
  6. //
  7. import UIKit
  8. @main
  9. class AppDelegate: UIResponder, UIApplicationDelegate {
  10. // MARK: Properties
  11. var dependency: NYAppDependency!
  12. var window: UIWindow?
  13. // MARK: UIApplicationDelegate
  14. func application(_ application:UIApplication, didFinishLaunchingWithOptions launchOptions:[UIApplication.LaunchOptionsKey: Any]?) -> Bool {
  15. self.dependency = self.dependency ?? CompositionRoot.resolve()
  16. self.window = self.dependency.window
  17. self.dependency.configureSDKs()
  18. self.dependency.configureAppearance()
  19. self.dependency.configureUserAgent()
  20. self.dependency.congigurePerformance()
  21. // 设置状态栏颜色
  22. UIApplication.shared.statusBarStyle = .lightContent
  23. return true
  24. }
  25. func application(
  26. _ app: UIApplication,
  27. open url: URL,
  28. options: [UIApplication.OpenURLOptionsKey: Any] = [:]
  29. ) -> Bool {
  30. return self.dependency.openURL(url, options)
  31. }
  32. }