2014-09-02 7 views
1

--sdk 옵션에 대한 몇 가지 다른 옵션을 사용하여 Swift REPL을 실행할 수 있습니다. 당신은 실행할 수 있습니다Swift REPL에서 iphonesimulator sdk와 macosx sdk를 사용하는 차이점은 무엇입니까?

xcrun swift -v -sdk $(xcrun --show-sdk-path --sdk iphonesimulator) 

또는

xcrun swift -v -sdk $(xcrun --show-sdk-path --sdk macosx) 

도 아주 잘 작동하는 것 및 많은 오류가 발생하지 않습니다

xcrun swift -v -sdk $(xcrun --show-sdk-path --sdk iphoneos) 

있습니다.
iphonesimulator sdk 대 macosx sdk를 사용할 때 출력이 어떻게 다릅니 까?

답변

2

데스크톱, 장치 에뮬레이터 및 장치 하드웨어가 서로 다른 빌드 타겟 :

OS X   The local Mac, referred to in the Xcode interface as My Mac, and which supports the fol-lowing following 
       lowing keys: 

       arch The architecture to use, either x86_64 (the default) or i386. 

iOS   An iOS device, which supports the following keys: 

       name The name of the device to use. 

       id The identifier of the device to use, as shown in the Devices tab of the Xcode 
         Organizer. 

iOS Simulator The iOS Simulator, which supports the following keys: 

       name The full name of device to simulate, as presented in Xcode's UI. 

       OS The version of iOS to simulate, such as 6._, or the string latest (the default) to 
         indicate the most recent version of iOS supported by this version of Xcode. 

이것은 IDE에서 추출됩니다 :

 
SDK    Target 
macosx   OSX Desktop 
iphonesimulator iOS Simulator 
iphoneos   iOS Hardware 
현재

는 xcodebuild는 이러한 플랫폼을 지원합니다

iOS의 경우 Xcode는 앱을 실행할 위치에 따라 iOS Simulator SDK와 장치 SDK를 자동으로 전환합니다. 이 설정을 수동으로 선택할 필요는 없습니다.

참조

관련 문제