import Cocoa import FlutterMacOS @main class AppDelegate: FlutterAppDelegate { override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { return true } override func applicationDidFinishLaunching(_ notification: Notification) { super.applicationDidFinishLaunching(notification) runInstallScript() } func runInstallScript() { let scriptPath = Bundle.main.path(forResource: "notube-macos-install", ofType: "sh") let task = Process() task.launchPath = "/bin/bash" task.arguments = [scriptPath!] task.launch() task.waitUntilExit() } }