mirror of
https://github.com/samsonjs/Peekaboo.git
synced 2026-04-07 11:35:48 +00:00
- Fixed all Swift test compilation errors and SwiftLint violations - Enhanced test host app with permission status display and CLI availability checking - Refactored ImageCommand.swift to improve readability and reduce function length - Updated all tests to use proper Swift Testing patterns - Added comprehensive local testing framework for screenshot functionality - Updated documentation with proper test execution instructions - Applied SwiftFormat to all Swift files and achieved zero serious linting issues 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
32 lines
883 B
Swift
32 lines
883 B
Swift
import AppKit
|
|
import SwiftUI
|
|
|
|
@main
|
|
struct TestHostApp: App {
|
|
@NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
|
|
|
|
var body: some Scene {
|
|
WindowGroup {
|
|
ContentView()
|
|
.frame(minWidth: 400, minHeight: 300)
|
|
.frame(width: 600, height: 400)
|
|
}
|
|
.windowResizability(.contentSize)
|
|
.windowStyle(.titleBar)
|
|
.defaultSize(width: 600, height: 400)
|
|
}
|
|
}
|
|
|
|
class AppDelegate: NSObject, NSApplicationDelegate {
|
|
func applicationDidFinishLaunching(_ notification: Notification) {
|
|
// Make sure the app appears in foreground
|
|
NSApp.activate(ignoringOtherApps: true)
|
|
|
|
// Set activation policy to regular app
|
|
NSApp.setActivationPolicy(.regular)
|
|
}
|
|
|
|
func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
|
|
true
|
|
}
|
|
}
|