forked from intitni/CopilotForXcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.swift
More file actions
29 lines (25 loc) · 834 Bytes
/
App.swift
File metadata and controls
29 lines (25 loc) · 834 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import Client
import HostApp
import LaunchAgentManager
import SwiftUI
import UpdateChecker
import XPCShared
struct VisualEffect: NSViewRepresentable {
func makeNSView(context: Self.Context) -> NSView { return NSVisualEffectView() }
func updateNSView(_ nsView: NSView, context: Context) { }
}
@main
struct CopilotForXcodeApp: App {
var body: some Scene {
WindowGroup {
TabContainer()
.frame(minWidth: 800, minHeight: 600)
.background(VisualEffect().ignoresSafeArea())
.onAppear {
UserDefaults.setupDefaultSettings()
}
.environment(\.updateChecker, UpdateChecker(hostBundle: Bundle.main))
}
}
}
var isPreview: Bool { ProcessInfo.processInfo.environment["XCODE_RUNNING_FOR_PREVIEWS"] == "1" }