我想用参数打开 FileZilla (ftp 应用程序)。
它正在与NSTask(又名过程):
let process:Process = Process()
process.launchPath = appURL.path
process.arguments = ["ftp://1.2.3.4"]
process.launch()
它不适用于NS工作区:
try! NSWorkspace.shared().launchApplication(
at: appURL,
options: .default,
configuration: [NSWorkspaceLaunchConfigurationArguments:["ftp://1.2.3.4"]]
)
With 不工作我的意思是,FileZilla 启动了,但争论并没有被忽略。
API 看起来很简单,但我不知道我在这里做错了什么。
我想使用 NSWorkspace 的原因是 NSTask 应用程序不会在前台启动。
None
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)