diff --git a/Secretive/Controllers/LaunchAgentController.swift b/Secretive/Controllers/LaunchAgentController.swift index 1f3ef5d..b9777c8 100644 --- a/Secretive/Controllers/LaunchAgentController.swift +++ b/Secretive/Controllers/LaunchAgentController.swift @@ -23,7 +23,9 @@ struct LaunchAgentController { Logger().debug("Agent is not running, attempting to force launch") let url = Bundle.main.bundleURL.appendingPathComponent("Contents/Library/LoginItems/SecretAgent.app") NSWorkspace.shared.openApplication(at: url, configuration: NSWorkspace.OpenConfiguration()) { app, error in - completion?(error == nil) + DispatchQueue.main.async { + completion?(error == nil) + } if let error = error { Logger().error("Error force launching \(error.localizedDescription)") } else {