How do I determine which iOS SDK I have?

IosXcodeXcodebuild

Ios Problem Overview


I'm sure this is simple, but how do I determine which version of the iOS SDK I currently have installed?

Ios Solutions


Solution 1 - Ios

If you type this:

$> xcodebuild -showsdks

it gives something like this:

$> OS X SDKs:
    OS X 10.8                     	-sdk macosx10.8
    OS X 10.9                     	-sdk macosx10.9

iOS SDKs:
    iOS 6.1                       	-sdk iphoneos6.1
    iOS 7.0                       	-sdk iphoneos7.0

iOS Simulator SDKs:
    Simulator - iOS 6.0           	-sdk iphonesimulator6.0
    Simulator - iOS 6.1           	-sdk iphonesimulator6.1
    Simulator - iOS 7.0           	-sdk iphonesimulator7.0

Solution 2 - Ios

If you care about the build number (like "10B61"), especially during betas, the best place to check which version of Xcode and related SDKs you have installed is to use "System Information".

Apple Menu > About This Mac > System Report > Software > Developer

Once there, you'll see version and build numbers for all of the major components of the Developer Tools. The top level version and build number corresponds to the name of the disk image you downloaded from Apple.

This is as of macOS 10.14.3.

Solution 3 - Ios

For latest version of MAC OS Mountain lion:

Apple Menu > About this Mac > More Info... > System Report... > Software > Developer

You will find Developer information like this:

Version: 4.6 (4H127) Location: /Applications/Xcode.app Applications: Xcode: 4.6 (2066) Instruments: 4.6 (46000) SDKs: OS X: 10.7: (11E52) 10.8: (12C37) iOS: 6.1: (10B141) iOS Simulator: 6.1: (10B141)

Solution 4 - Ios

Update: Thanks to Stan for showing how to do it with Xcode 4.3 on Lion:

ls /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/‌​SDKs/

The following command shows a listing of all the iPhone SDKs installed on your computer.

ls /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/

Solution 5 - Ios

from the desktop: utilities/system information/software/developer -- lists the installed SDK's

Solution 6 - Ios

The simplest why I found is to run this command line:

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

OR, if you have multiple XCode versions:

sudo xcode-select -switch /Applications/Xcode<version_number>.app/Contents/Developer

fastlane isn't able to successfully execute that command so it sounds like that you don't have an Xcode version selected for xcodebuild to run things with. Running the xcode-select command above should do the trick for you ;)

Source: https://github.com/fastlane/fastlane/issues/12784

Solution 7 - Ios

xcode-select --print-path #print your current path Probably this path
/Library/Developer/CommandLineTools

sudo xcode-select --reset #reset to the default command line tools path 


xcode-select --print-path# the default should this path
/Applications/Xcode.app/Contents/Developer


xcrun -sdk iphonesimulator --show-sdk-path #the path: /usr/bin/xcrun 
#should to print the num of iPhoneSimulator:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator{num}.sdk

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJosh BrownView Question on Stackoverflow
Solution 1 - IosJohan KoolView Answer on Stackoverflow
Solution 2 - IosJason MedeirosView Answer on Stackoverflow
Solution 3 - IosNitinView Answer on Stackoverflow
Solution 4 - IosJosh BrownView Answer on Stackoverflow
Solution 5 - IosMarkView Answer on Stackoverflow
Solution 6 - IosSoufiane ROCHDIView Answer on Stackoverflow
Solution 7 - IosYoniView Answer on Stackoverflow