Fix XPC validation

This commit is contained in:
世界
2026-01-05 15:42:56 +08:00
parent af9cfd0f59
commit 8a62a58ce7
12 changed files with 278 additions and 145 deletions
@@ -76,9 +76,15 @@ public struct AppView: View {
Section {
if rootHelperRegistrationStatus == .enabled {
FormButton {
performHelperAction {
try HelperServiceManager.unregisterRootHelper()
try HelperServiceManager.registerRootHelper()
Task {
do {
try HelperServiceManager.unregisterRootHelper()
try await Task.sleep(for: .seconds(1))
try HelperServiceManager.registerRootHelper()
refreshHelperStatus()
} catch {
alert = AlertState(error: error)
}
}
} label: {
Label("Update", systemImage: "arrow.down.doc.fill")