Open bartoszkosiorek opened 7 years ago
Currently xcversion simulators
is not listing the 10.3 simulators for Xcode 8.3. I assume it's because they either aren't listed at the current download locations, or we need a new URL: https://github.com/KrauseFx/xcode-install/blob/11e949075818c5291c0ac10c354564d3090afada/lib/xcode/install.rb#L471-L479
I still get the same bplist if I do this:
curl https://devimages-cdn.apple.com/downloads/xcode/simulators/index-8.3.0-DFFB3951-EB0A-4C09-9DAC-5F2D28CC839C.dvtdownloadableindex
Currently the iOS simulator installed?
test is done based on whether an InstallPrefix
like /Library/Developer/CoreSimulator/Profiles/Runtimes/iOS <foo>
exists - but since Xcode 8.3 ships with iOS 10.3's simulator, I'd guess that XcodeInstall doesn't pick up its installed state.
Xcode normally bundles the "current" simulator in the app bundle, and it's previous versions of the simulator which are offered as downloads, and which would be installed into that path at /L/Developer
. Xcode therefore doesn't need to offer a download or "check state" for the version of the simulator which is "current" for a given release.
We should find a way to have it list them. I use xcversion simulators
and a script to determine if a required simulator is installed for CI. When you run multiple versions of Xcode things get funny.
I think that in order to include the versions that a given Xcode already ships with, you'll need to then parse the contents of /Applications/Xcode.app/Contents/Developer/Platforms/*Simulator.platform
bundles.
e.g. /Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/SDKSettings.plist
:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CanonicalName</key>
<string>appletvsimulator10.2</string>
<key>CustomProperties</key>
<dict/>
<key>DefaultDeploymentTarget</key>
<string>10.2</string>
<key>DefaultProperties</key>
<dict>
<key>AD_HOC_CODE_SIGNING_ALLOWED</key>
<string>YES</string>
<key>CODE_SIGNING_REQUIRED</key>
<string>YES</string>
<key>CODE_SIGN_ENTITLEMENTS</key>
<string></string>
<key>DEAD_CODE_STRIPPING</key>
<string>YES</string>
<key>DEFAULT_COMPILER</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DEPLOYMENT_TARGET_SUGGESTED_VALUES</key>
<array>
<string>9.0</string>
<string>9.1</string>
<string>9.2</string>
<string>10.0</string>
<string>10.1</string>
<string>10.2</string>
</array>
<key>ENTITLEMENTS_REQUIRED</key>
<string>YES</string>
<key>PLATFORM_NAME</key>
<string>appletvsimulator</string>
<key>SUPPORTED_DEVICE_FAMILIES</key>
<string>3</string>
<key>TVOS_DEPLOYMENT_TARGET</key>
<string>10.2</string>
</dict>
<key>DisplayName</key>
<string>Simulator - tvOS 10.2</string>
<key>DocSetFeedName</key>
<string>tvOS 10.2</string>
<key>DocSetFeedURL</key>
<string>http://developer.apple.com/rss/com.apple.adc.documentation.AppleTVOS10_2.atom</string>
<key>IsBaseSDK</key>
<string>YES</string>
<key>MaximumDeploymentTarget</key>
<string>10.2.99</string>
<key>MinimalDisplayName</key>
<string>Simulator - 10.2</string>
<key>Toolchains</key>
<array>
<string>com.apple.dt.toolchain.AppleTVOS10_2</string>
</array>
<key>Version</key>
<string>10.2</string>
</dict>
</plist>
simctl list
will also list simulators, which we could use.
You could get list of deviced with command:
$ xcrun simctl list devices
== Devices ==
-- iOS 10.2 --
iPhone 5 (F852B612-D9C6-4453-ADC3-0BE6DB12B8B6) (Shutdown)
iPhone 5s (AC719A6A-9C93-4C6C-87C7-A819626E093F) (Shutdown)
iPhone 6 (BED0A972-7E9C-4055-9DC6-6D36C5A4888A) (Shutdown)
iPhone 6 Plus (8C74B13F-DE31-41C3-B024-90C4345B3C28) (Shutdown)
iPhone 6s (49DCCC27-6DE0-478F-A5AF-4ADFCA53F3ED) (Shutdown)
iPhone 6s Plus (B0C1F36F-8B9B-4111-8F9C-9E1A8C45252A) (Shutdown)
iPhone 7 (16A92259-6C7A-4698-8524-86F3A9035D3A) (Shutdown)
iPhone 7 Plus (D753E4E1-E840-4B55-8022-1A7C28BCD524) (Shutdown)
iPhone SE (1640508F-FD6E-4730-80A2-C2D4D963198C) (Shutdown)
iPad Retina (A288AF1A-B38D-4EAD-BE54-61741CCAF66F) (Shutdown)
iPad Air (8E806449-FDD7-45A0-BB96-F6B079D0B759) (Shutdown)
iPad Air 2 (3357B90C-E4AA-49F9-9AD0-690E6ABEE4C2) (Shutdown)
iPad Pro (9.7 inch) (B6EF21C6-B02A-4DC1-ABFC-BF24354107E0) (Shutdown)
iPad Pro (12.9 inch) (DAF530C6-3A1E-462E-8C97-8F21A3DD4BCD) (Shutdown)
-- tvOS 10.1 --
Apple TV 1080p (02FD0259-781F-41AE-96C1-9965619F9EE0) (Shutdown)
-- watchOS 3.1 --
Apple Watch - 38mm (E6B10197-CB56-4416-B9D0-DAD94B978815) (Shutdown)
Apple Watch - 42mm (8795974B-F9EB-4740-99C6-12A7EB30E3E2) (Shutdown)
Apple Watch Series 2 - 38mm (370E3B41-9AE8-430B-9CE7-28E604A730BB) (Shutdown)
Apple Watch Series 2 - 42mm (ADA682CE-E279-4356-90F8-9E4739F612B9) (Shutdown)
To get device types:
$ xcrun simctl list devicetypes
== Device Types ==
iPhone 4s (com.apple.CoreSimulator.SimDeviceType.iPhone-4s)
iPhone 5 (com.apple.CoreSimulator.SimDeviceType.iPhone-5)
iPhone 5s (com.apple.CoreSimulator.SimDeviceType.iPhone-5s)
iPhone 6 (com.apple.CoreSimulator.SimDeviceType.iPhone-6)
iPhone 6 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus)
iPhone 6s (com.apple.CoreSimulator.SimDeviceType.iPhone-6s)
iPhone 6s Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6s-Plus)
iPhone 7 (com.apple.CoreSimulator.SimDeviceType.iPhone-7)
iPhone 7 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-7-Plus)
iPhone SE (com.apple.CoreSimulator.SimDeviceType.iPhone-SE)
iPad 2 (com.apple.CoreSimulator.SimDeviceType.iPad-2)
iPad Retina (com.apple.CoreSimulator.SimDeviceType.iPad-Retina)
iPad Air (com.apple.CoreSimulator.SimDeviceType.iPad-Air)
iPad Air 2 (com.apple.CoreSimulator.SimDeviceType.iPad-Air-2)
iPad Pro (9.7-inch) (com.apple.CoreSimulator.SimDeviceType.iPad-Pro--9-7-inch-)
iPad Pro (12.9-inch) (com.apple.CoreSimulator.SimDeviceType.iPad-Pro)
Apple TV 1080p (com.apple.CoreSimulator.SimDeviceType.Apple-TV-1080p)
Apple Watch - 38mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-38mm)
Apple Watch - 42mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-42mm)
Apple Watch Series 2 - 38mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-38mm)
Apple Watch Series 2 - 42mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-2-42mm)
And to get list of Simulators runtimes, you could specify:
$ xcrun simctl list runtimes
== Runtimes ==
iOS 10.2 (10.2 - 14C89) (com.apple.CoreSimulator.SimRuntime.iOS-10-2)
tvOS 10.1 (10.1 - 14U591) (com.apple.CoreSimulator.SimRuntime.tvOS-10-1)
watchOS 3.1 (3.1 - 14S471a) (com.apple.CoreSimulator.SimRuntime.watchOS-3-1)
And we get more easily-parseable output with --json
:
➜ ~ xcrun simctl list --json runtimes
{
"runtimes" : [
{
"buildversion" : "14E269",
"availability" : "(available)",
"name" : "iOS 10.3",
"identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-10-3",
"version" : "10.3"
},
{
"buildversion" : "14W260",
"availability" : "(available)",
"name" : "tvOS 10.2",
"identifier" : "com.apple.CoreSimulator.SimRuntime.tvOS-10-2",
"version" : "10.2"
},
{
"buildversion" : "14V243",
"availability" : "(available)",
"name" : "watchOS 3.2",
"identifier" : "com.apple.CoreSimulator.SimRuntime.watchOS-3-2",
"version" : "3.2"
}
]
}
Hi. I upgraded one machine from Continous Integration system from Yosemite (with iOS Simulator 8.1) to Sierra, and install Xcode 8.2.1 with command:
$ /usr/local/bin/xcversion install "8.2.1"
Next I would like to have installed Xcode in default location, as it is done with Apple Store.
I'm removing symbolic link
$ rm -rf /Applications/Xcode.app
And moving Xcode to desired location:
After that Xcode is working perfectly fine. Previous "iOS SImulator 8.1" was replaced with "iOS SImulator 10.2" (see screenshot in attachment)
I could check that the 10.2 simulator is installed with command:
Unfortunately
diversion simulators
is still mention thatiOS 8.1 Simulator
is installed. Also there is no word aboutiOS 10.2 Simulator
, that it is available and installed:How I could install
iOS 8.1 Simulator
with xcversion ?