Initial Push
This commit is contained in:
26
AppMain.swift
Normal file
26
AppMain.swift
Normal file
@@ -0,0 +1,26 @@
|
||||
import Cocoa
|
||||
|
||||
@main
|
||||
class AppDelegate: NSObject, NSApplicationDelegate {
|
||||
var mainWindow: MainWindowController!
|
||||
|
||||
func applicationDidFinishLaunching(_ notification: Notification) {
|
||||
NSLog("=== App launched ===")
|
||||
AIManager.shared.updateService()
|
||||
|
||||
NSLog("Creating main window...")
|
||||
mainWindow = MainWindowController()
|
||||
NSLog("Showing window...")
|
||||
mainWindow.showWindow(nil)
|
||||
|
||||
NSLog("Window visible: \(mainWindow.window?.isVisible ?? false)")
|
||||
NSLog("Window frame: \(mainWindow.window?.frame ?? .zero)")
|
||||
|
||||
NSApp.activate(ignoringOtherApps: true)
|
||||
NSLog("=== Setup complete ===")
|
||||
}
|
||||
|
||||
func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user