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.
Run `xcodebuild -showsdks` to list installed SDKs, and `xcodebuild -version` for the Xcode build number.
01Command
Command
$ xcodebuild -showsdks && xcodebuild -version02What 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
04Undo
✓No undo needed — this command does not change persistent state.
05Sources
- xcodebuild(1) — macOS man pageEvidence: Documents xcodebuild -showsdks (list available SDKs) and -version.
Last verified: 2026-09-17 · Category: Developer