App.swift 902 B

123456789101112131415161718192021222324252627282930
  1. /*
  2. * This file is part of the SDWebImage package.
  3. * (c) DreamPiggy <lizhuoli1126@126.com>
  4. *
  5. * For the full copyright and license information, please view the LICENSE
  6. * file that was distributed with this source code.
  7. */
  8. import SwiftUI
  9. import SDWebImage
  10. class AppDelegate: NSObject, UIApplicationDelegate {
  11. func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
  12. // Insert code here to initialize your application
  13. SDImageCodersManager.shared.addCoder(SDImageAWebPCoder.shared)
  14. SDImageCodersManager.shared.addCoder(SDImageHEICCoder.shared)
  15. return true
  16. }
  17. }
  18. @main
  19. struct SDWebImage_Vision_DemoApp: App {
  20. @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
  21. var body: some Scene {
  22. WindowGroup {
  23. ContentView()
  24. }
  25. }
  26. }