programing

어떤 iOS SDK가 있는지 어떻게 확인합니까?

easyjava 2023. 5. 4. 20:41
반응형

어떤 iOS SDK가 있는지 어떻게 확인합니까?

이것은 간단할 것입니다만, 현재 설치한 iOS SDK 버전을 어떻게 확인합니까?

입력할 경우:

$> 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

빌드 번호("10B61" 등)에 관심이 있다면, 특히 베타 중에 설치한 Xcode 및 관련 SDK의 버전을 확인하는 가장 좋은 방법은 "시스템 정보"를 사용하는 것입니다.

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

그러면 Developer Tools의 모든 주요 구성 요소에 대한 버전 및 빌드 번호가 표시됩니다.최상위 버전 및 빌드 번호는 Apple에서 다운로드한 디스크 이미지의 이름에 해당합니다.

이것은 macOS 10.14.3 기준입니다.

MAC OS Mountain lion의 최신 버전:

Apple Menu > 이 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)

업데이트: 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/

바탕 화면: 유틸리티/시스템 정보/소프트웨어/개발자 - 설치된 SDK 목록

가장 간단한 이유는 다음 명령줄을 실행하는 것입니다.

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

또는 XCode 버전이 여러 개인 경우:

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

Fastlane은 해당 명령을 성공적으로 실행할 수 없으므로 Xcode 버전이 선택되지 않은 것처럼 들립니다.xcodebuild일을 처리할 수 있습니다.실행xcode-select위의 명령은 당신을 위해 속임수를 써야 합니다 ;)

출처: https://github.com/fastlane/fastlane/issues/12784

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

언급URL : https://stackoverflow.com/questions/1480184/how-do-i-determine-which-ios-sdk-i-have

반응형