107

これは簡単だと思いますが、現在インストールされている iOS SDK のバージョンを確認するにはどうすればよいですか?

4

7 に答える 7

182

これを入力すると:

$> xcodebuild -showsdks

それは次のようなものを与えます:

$> 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
于 2013-10-15T09:32:37.763 に答える
58

特にベータ版のビルド番号(「10B61」など)が気になる場合は、インストールしたXcodeおよび関連するSDKのバージョンを確認するのに最適な場所は「システム情報」を使用することです。

Appleメニュー>このMacについて>システムレポート>ソフトウェア>開発者

そこに入ると、開発者ツールのすべての主要コンポーネントのバージョン番号とビルド番号が表示されます。トップレベルのバージョンとビルド番号は、Appleからダウンロードしたディスクイメージの名前に対応しています。

これはmacOS10.14.3以降です。

于 2009-10-26T16:32:24.777 に答える
19

MAC OS マウンテン ライオンの最新バージョンの場合:

Apple メニュー > この Mac について > 詳細情報... > システム レポート... > ソフトウェア > 開発者

次のような開発者情報が表示されます。

バージョン: 4.6 (4H127) 場所: /Applications/Xcode.app アプリケーション: Xcode: 4.6 (2066) 機器: 4.6 (46000) SDK: OS X: 10.7: (11E52) 10.8: (12C37) iOS: 6.1: (10B141) iOS シミュレータ: 6.1: (10B141)

于 2013-06-18T12:19:09.570 に答える
14

更新: Lion で Xcode 4.3 を使用する方法を示してくれた Stan に感謝します:

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

次のコマンドは、コンピューターにインストールされているすべての iPhone SDK の一覧を表示します。

ls /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/
于 2009-09-26T19:28:18.210 に答える
0
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

于 2021-11-05T10:37:04.567 に答える