AppDelegate.swift 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //
  2. // AppDelegate.swift
  3. // PDF Reader Pro DMG
  4. //
  5. // Created by Niehaoyu on 2022/9/23.
  6. //
  7. import Cocoa
  8. @main
  9. class AppDelegate: NSObject, NSApplicationDelegate {
  10. func applicationWillFinishLaunching(_ notification: Notification) {
  11. ComPDFUIConfig.initializeUIConfig();
  12. }
  13. func applicationDidFinishLaunching(_ aNotification: Notification) {
  14. KMNThumbnailManager.clearCacheThumImage() //清除页面缩图缓存
  15. // Insert code here to initialize your application
  16. // MARK: 广告数据初始化
  17. KMAdvertisementManager.manager.initConfig(appName: .PDFReaderProMac,
  18. subscribeType: .unsubscribed,
  19. platform: .Mac)
  20. // 测试模式,默认false
  21. KMAdvertisementManager.manager.debug = true
  22. }
  23. func applicationWillTerminate(_ aNotification: Notification) {
  24. // Insert code here to tear down your application
  25. }
  26. func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
  27. return true
  28. }
  29. }