I would like to open FileZilla (ftp application) with an argument.
It is working with NSTask (aka. Process):
let process:Process = Process()
process.launchPath = appURL.path
process.arguments = ["ftp://1.2.3.4"]
process.launch()
It is not working with NSWorkspace:
try! NSWorkspace.shared().launchApplication(
at: appURL,
options: .default,
configuration: [NSWorkspaceLaunchConfigurationArguments:["ftp://1.2.3.4"]]
)
With not working I mean, that FileZilla launches, but the argument is not passed over.
The API seems simple, but I can not figure out what I am doing wrong here.
The reason why I want to use NSWorkspace is, that NSTask the application will not launch in foreground.