File tree 3 files changed +20
-3
lines changed
3 files changed +20
-3
lines changed Original file line number Diff line number Diff line change 1
1
import Client
2
+ import HostApp
3
+ import LaunchAgentManager
2
4
import SwiftUI
3
5
import UpdateChecker
4
6
import XPCShared
5
- import HostApp
6
7
7
8
@main
8
9
struct CopilotForXcodeApp : App {
@@ -19,3 +20,4 @@ struct CopilotForXcodeApp: App {
19
20
}
20
21
21
22
var isPreview : Bool { ProcessInfo . processInfo. environment [ " XCODE_RUNNING_FOR_PREVIEWS " ] == " 1 " }
23
+
Original file line number Diff line number Diff line change 1
1
import Foundation
2
+ import LaunchAgentManager
2
3
import SwiftUI
3
4
import UpdateChecker
4
5
@@ -67,6 +68,20 @@ public struct TabContainer: View {
67
68
. environment ( \. toast) { [ toastController] content, type in
68
69
toastController. toast ( content: content, type: type)
69
70
}
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
+ }
70
85
}
71
86
}
72
87
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