List Available SDKs with xcodebuild -showsdks

xcodebuild -showsdks prints every installed SDK (iOS, macOS, watchOS, tvOS, visionOS) plus the Xcode version — the fastest way to confirm a toolchain.

macOSxcodebuildsdkXcodeLow risk
Run `xcodebuild -showsdks` to list installed SDKs, and `xcodebuild -version` for the Xcode build number.

01Command

Command
$ xcodebuild -showsdks && xcodebuild -version

02What it does

CI scripts and Makefiles often need the exact SDK name — like iphoneos18.0 or macosx15.0 — to pass via -sdk, and -showsdks is the canonical source for those strings. Pair it with `xcrun --sdk iphoneos --find clang` to locate tools inside a specific SDK. If the output looks stale or errors, you're probably using the wrong toolchain selected by xcode-select, not a missing SDK.

03Risk

RiskLow risk
RequirementsXcode or Command Line Tools

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

Last verified: 2026-09-17 · Category: Developer