File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import Client
2+ import HostApp
3+ import LaunchAgentManager
24import SwiftUI
35import UpdateChecker
46import XPCShared
5- import HostApp
67
78@main
89struct CopilotForXcodeApp : App {
@@ -19,3 +20,4 @@ struct CopilotForXcodeApp: App {
1920}
2021
2122var isPreview : Bool { ProcessInfo . processInfo. environment [ " XCODE_RUNNING_FOR_PREVIEWS " ] == " 1 " }
23+
Original file line number Diff line number Diff line change 11import Foundation
2+ import LaunchAgentManager
23import SwiftUI
34import UpdateChecker
45
@@ -67,6 +68,20 @@ public struct TabContainer: View {
6768 . environment ( \. toast) { [ toastController] content, type in
6869 toastController. toast ( content: content, type: type)
6970 }
71+ . onAppear {
72+ #if DEBUG
73+ // do not auto install on debug build
74+ #else
75+ Task {
76+ do {
77+ try await LaunchAgentManager ( )
78+ . setupLaunchAgentForTheFirstTimeIfNeeded ( )
79+ } catch {
80+ toastController. toast ( content: Text ( error. localizedDescription) , type: . error)
81+ }
82+ }
83+ #endif
84+ }
7085 }
7186}
7287
Original file line number Diff line number Diff line change 1- APP_VERSION = 0.15.3
2- APP_BUILD = 153
1+ APP_VERSION = 0.15.4
2+ APP_BUILD = 154
You can’t perform that action at this time.
0 commit comments