How do I determine which iOS SDK I have?

前端 未结 5 2077
失恋的感觉
失恋的感觉 2021-01-30 04:38

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

相关标签:
5条回答
  • 2021-01-30 05:21

    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)

    0 讨论(0)
  • 2021-01-30 05:22

    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

    0 讨论(0)
  • 2021-01-30 05:28

    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
    
    0 讨论(0)
  • 2021-01-30 05:38

    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.

    0 讨论(0)
  • 2021-01-30 05:39

    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/
    
    0 讨论(0)
提交回复
热议问题