How do I determine which iOS SDK I have?
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
Introduction
If you are debugging an Xcode build, choosing a deployment target, or comparing project settings across machines, you need to know which iOS SDKs are installed locally. The most reliable answers come from Xcode command-line tools, because they show both the available SDK names and the active SDK versions that Xcode can build against.
Understand What You Are Looking For
There are two related version concepts in iOS development:
- the iOS SDK version installed with Xcode
- the app deployment target your project supports
They are not the same. You might build with a newer SDK while still targeting older iOS releases for runtime compatibility. When people ask which SDK they have, they usually mean the first one.
List Installed SDKs With xcodebuild
The simplest command is:
Typical output looks like this:
This tells you which device and simulator SDKs the selected Xcode installation currently exposes.
Ask For The Active iPhone OS SDK Version
If you want just the version number for the active device SDK, use xcrun.
You can also inspect the SDK path itself:
That is useful when a build script needs the physical SDK directory, not just the version string.
Confirm Which Xcode Is Selected
On systems with multiple Xcode installations, the selected developer directory determines which SDKs the CLI reports.
If that path does not point to the Xcode you expect, the SDK output will also be misleading. To inspect the Xcode app version directly:
That command tells you the Xcode version and the build number, which is often the first thing to compare across machines.
Check Inside Xcode
You can also inspect the SDK from the IDE. Open a project, select the target, and look at the Base SDK and deployment settings in the build configuration. That is useful when you care about what the project is actually configured to use, not just what is installed globally.
The CLI is still better for scripting and for headless debugging on CI agents.
Distinguish SDK From Simulator Runtime
Simulator runtimes are related, but they are not the same as the base device SDK. You may have a given iOS SDK available for building while having fewer simulator runtime versions installed. If your build succeeds but a simulator choice is missing, that difference is often the reason.
In day-to-day work, use:
- '
xcodebuild -showsdksfor installed SDK inventory' - '
xcrun --sdk iphoneos --show-sdk-versionfor the active device SDK version' - Xcode project settings for the build configuration actually chosen by the app target
Example: Use The Value In A Script
A shell script can read the active SDK and print it in logs.
This is useful in CI pipelines where environment drift causes builds to behave differently from local machines.
Common Pitfalls
The most common mistake is confusing the deployment target with the installed SDK version. The deployment target tells you the minimum runtime version supported by the app, not which SDK Xcode is compiling against.
Another mistake is forgetting that xcode-select controls the active developer directory. If multiple Xcode versions are installed, the command-line tools may be reporting SDKs from a different Xcode than the one you opened in the GUI.
A third issue is assuming a simulator runtime implies the same device SDK or vice versa. They are distributed together often enough to feel related, but they are still separate pieces of the toolchain.
Summary
- Use
xcodebuild -showsdksto list the SDKs installed for the active Xcode. - Use
xcrun --sdk iphoneos --show-sdk-versionto print the active device SDK version. - Check
xcode-select -pif you have more than one Xcode installed. - Do not confuse the installed SDK with the project deployment target.
- Use both CLI tools and project settings when debugging build environment mismatches.

