訪問 Xcode app bundle(xcrun) 中的任何命令列工具

xcrun 使用系統預設的 Xcode 版本(通過 xcode-select 設定)從 Xcode 應用程式包中定位和執行命令列工具,例如 llvm-cov。

# Generate code coverage reports via llvm-cov 
# /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
xcrun llvm-cov [parameters]

# Execute xcodebuild 
# /Applications/Xcode.app/Contents/Developer/usr/bin
xcrun xcodebuild [parameters]

# Use Xcode's version of git, e.g., if you have installed a newer version
# /Applications/Xcode.app/Contents/Developer/usr/bin 
xcrun git [parameters]