![](/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.