I don't know why, but why the code below does not have the expected behavior?
let workspace = NSWorkspace.shared if let bundleURL = workspace.urlForApplication(withBundleIdentifier: "com.apple.Safari"){ workspace.open(bundleURL) let conf = NSWorkspace.OpenConfiguration() conf.activates = false conf.hides = true workspace.openApplication(at: bundleURL, configuration: conf){ (app, err) in print(app as Any) print(err as Any) } } When I run the code, the Safari application is opening normally, neither “Hides” is working nor “Activates” false is working.
Obs: App Sandboxed: NO | Deployment Target: 11.3 | Xcode: 12.5.1