Ocideck/macos/Runner/AppDelegate.swift

22 lines
605 B
Swift
Raw Permalink Normal View History

import Cocoa
import FlutterMacOS
@main
class AppDelegate: FlutterAppDelegate {
override func applicationDidFinishLaunching(_ notification: Notification) {
if let iconPath = Bundle.main.path(forResource: "AppIcon", ofType: "icns") {
NSApp.applicationIconImage = NSImage(contentsOfFile: iconPath)
}
super.applicationDidFinishLaunching(notification)
}
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
return true
}
override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool {
return true
}
}