This repository has been archived on 2026-06-05. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files

25 lines
735 B
Swift

import Cocoa
import FlutterMacOS
@NSApplicationMain
class AppDelegate: FlutterAppDelegate {
var launched = false;
override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
dummy_method_to_enforce_bundling()
// https://github.com/leanflutter/window_manager/issues/214
return false
}
override func applicationShouldOpenUntitledFile(_ sender: NSApplication) -> Bool {
if (launched) {
handle_applicationShouldOpenUntitledFile();
}
return true
}
override func applicationDidFinishLaunching(_ aNotification: Notification) {
launched = true;
NSApplication.shared.activate(ignoringOtherApps: true);
}
}