我使用带有可执行URL的过程编写了一些代码。
当我运行该应用程序时。并执行过程说
不允许操作
let process = Process()
process.executableURL = URL(fileURLWithPath:cmdPath)
process.arguments = ["-l","-v","12345"]
process.terminationHandler = { (process) in
print("\ndidFinish: \(!process.isRunning)")
}
do {
try process.run()
} catch {
print(error)
}