通过命令行从XCode列出目标

Dar*_*451 4 macos xcode

是否可以从命令行或任何其他方式获取xcode项目的目标而无需在xcode本身中打开文件?

谢谢!

小智 10

尝试

xcodebuild -list 


macaroni:CLIClone todd$ xcodebuild -list
Information about project "CLIClone":

Targets:
    CLIClone

Build Configurations:
    Debug
    Release

If no build configuration is specified and -scheme is not passed then "Release" is used.

Schemes:
    CLIClone
Run Code Online (Sandbox Code Playgroud)

  • 使用“xcodebuild -list -json”以 JSON 形式返回相同的结果。然后您可以使用“jq”或其他工具来操作 JSON 数据。 (2认同)