How to install iOS simulators from the command line

This is a common case for running tests against different versions of iOS simulators / SDKs on CI. However, only the latest iOS simulator is installed by Xcode by default.

Therefore, I need to install other missing iOS simulators from the command line in the CI environment. But I can not find a way to install these simulators from the command line.

+4
source share
4 answers

This can be done using xcode-install with the following commands

gem install xcode-install
xcversion simulators --install='iOS 9.3'
+9
source

Fyi

Xcode. Xcode. Xcode7.0 iOS9 Xcode6.4 iOS8.x

CI, , xcode, xcodebuild

xcode-select -switch <path to your xcode app>

xcode xcodebuild xcodebuild .

xcodebuild -configuration ${BUILD_TYPE} -target ${TARGET_NAME} -arch ${CPU_ARCHITECTURE} -sdk ${SIMULATOR_OR_IOS_SDK} 

SIMULATOR_OR_IOS_SDK .

,

xcodebuild -showsdks

OS X SDKs:
    OS X 10.11                      -sdk macosx10.11

iOS SDKs:
    iOS 9.1                         -sdk iphoneos9.1

iOS Simulator SDKs:
    Simulator - iOS 9.1             -sdk iphonesimulator9.1

tvOS SDKs:
    tvOS 9.0                        -sdk appletvos9.0

tvOS Simulator SDKs:
    Simulator - tvOS 9.0            -sdk appletvsimulator9.0

watchOS SDKs:
    watchOS 2.0                     -sdk watchos2.0

watchOS Simulator SDKs:
    Simulator - watchOS 2.0         -sdk watchsimulator2.0

//os.

, :)

+1

Source: https://habr.com/ru/post/1621959/


All Articles