mirror of
https://github.com/pointfreeco/swift-composable-architecture.git
synced 2025-12-20 09:11:33 +01:00
* wip * wip * wip * wip * wip * basics * wip * wip * wip got LocalSearchClient spm package * got a common spm package * basics of desktop * renamed * wip * clean up * Fix * clean up * formatting and remove deprecated * wip * move stuff around, readmes * fix * clean up * image * typo * docs * wip * typo * rename * wip * clean up * clean up * rename * wip * Update README.md * custom button * format * wip * fix * error info * public interface * set, alpha * add error * fix * alpha * internal * Revert "internal" This reverts commit97da6f3086. * wip * wip * docs * rename * cleanup * add fatal error messages to mock * fixes * fixes * clean up * 13.3 fixes * another fix * 13.3 fixes * wip * fix mac tests * wip * just use double * fix * Revert "fix" This reverts commit4565a6485f. * fix * Fix? * Fix * More fix Co-authored-by: Stephen Celis <stephen@stephencelis.com>
35 lines
929 B
Swift
35 lines
929 B
Swift
import Cocoa
|
|
import ComposableArchitecture
|
|
import SwiftUI
|
|
|
|
@NSApplicationMain
|
|
class AppDelegate: NSObject, NSApplicationDelegate {
|
|
var window: NSWindow!
|
|
|
|
func applicationDidFinishLaunching(_ aNotification: Notification) {
|
|
let contentView = LocationManagerView(
|
|
store: Store(
|
|
initialState: AppState(),
|
|
reducer: appReducer,
|
|
environment: AppEnvironment(
|
|
localSearch: .live,
|
|
locationManager: .live
|
|
)
|
|
)
|
|
)
|
|
|
|
window = NSWindow(
|
|
contentRect: NSRect(x: 0, y: 0, width: 700, height: 500),
|
|
styleMask: [.titled, .closable, .miniaturizable, .fullSizeContentView],
|
|
backing: .buffered, defer: false
|
|
)
|
|
window.center()
|
|
window.setFrameAutosaveName("Main Window")
|
|
window.contentView = NSHostingView(rootView: contentView)
|
|
window.makeKeyAndOrderFront(nil)
|
|
}
|
|
|
|
func applicationWillTerminate(_ aNotification: Notification) {
|
|
}
|
|
}
|