AppDelegate.swift 996 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. return true
  22. }
  23. func application(
  24. _ app: UIApplication,
  25. open url: URL,
  26. options: [UIApplication.OpenURLOptionsKey: Any] = [:]
  27. ) -> Bool {
  28. return self.dependency.openURL(url, options)
  29. }
  30. }