![](/img/trans.png)
[英]Running terminal commands from Cocoa App in Swift failing: “command not found” but works using Command Line Tool in swift
[英]Running command line tool from Swift
我想在Swift的MacOS项目中加入命令行工具。 基本上,我希望我可以以字符串形式传递参数和选项,就像我从普通命令行使用该工具一样。 但是我不知道从哪里开始。 欢迎小费。
就命令行的参数和选项而言,您正在寻找Process类 (在Objective-C中称为NSTask)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.