Determining which “device” is running in the iPhone Simulator

I ran into a problem (again an issue with inheriting someone else’s system and trying to figure out how all the parts work.).  The System uses xCode, and Appium, and Ruby, and RSPEC.  In theory, according to the documention there is a configuration file, which based on the GUID tells me which “device” is running in the simulator.  Per this configuration file, which only has one line of text:

  • {“Simulator ID”: “FEE861DF-59E1-43EA-B17A-A3C289293B0C”}

The Device that is running should have a GUID of FEE861DF-59E1-43EA-B17A-A3C289293B0C.  So if I track that device down in the Developer Directory (see: https://qatesttech.wordpress.com/2015/04/22/resetting-an-iphone-simulator-and-clearing-images/ ),  I will find a device.plist, which has the device description.

According to the device.plist, I should be running an iPhone 6 with iOS 8.2, and this also lets me track down the image directory so I can put in the images I want to process with our App.  However when I ran the test suite, using the “magical” command:  rspec spec/business_card_spec.rb (which is rspec <sub-directory> and name of the test suite that needs to be run), the simulator launched fine, but when it opened the Photo Albums it had different photos and the version at the top of the simulator said “8.3” – so something isn’t quite right.

Fortunately I add a second window open (from trying to add images while the iPhone Simulator was running) and I ran the command:

  • xcrun simctl list

This provided some awesome insight, I got back this list (a bit hard on the eyes):

== 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 Plus (com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus)
iPhone 6 (com.apple.CoreSimulator.SimDeviceType.iPhone-6)
iPad 2 (com.apple.CoreSimulator.SimDeviceType.iPad-2)
iPad Retina (com.apple.CoreSimulator.SimDeviceType.iPad-Retina)
iPad Air (com.apple.CoreSimulator.SimDeviceType.iPad-Air)
Resizable iPhone (com.apple.CoreSimulator.SimDeviceType.Resizable-iPhone)
Resizable iPad (com.apple.CoreSimulator.SimDeviceType.Resizable-iPad)
== Runtimes ==
iOS 8.3 (8.3 – 12F69) (com.apple.CoreSimulator.SimRuntime.iOS-8-3)
== Devices ==
— iOS 8.3 —
iPhone 4s (CF459D0C-F679-437D-894B-72FD95436AF1) (Shutdown)
iPhone 5 (C66C2BC3-9A6D-493D-A9D8-915E40363B7C) (Shutdown)
iPhone 5s (80B3FD17-5D99-4DF9-A0C9-372CAC091828) (Shutdown)
iPhone 6 Plus (632E3762-6129-4939-BAFF-B6F1099BD3F4) (Shutdown)
iPhone 6 (6A0CB955-C22B-48A6-A7F5-809806EB57F2) (Booted)
iPad 2 (B0D6162A-B01D-4BE1-929E-18855C29B847) (Shutdown)
iPad Retina (B74C3D84-99B0-43AF-8D75-2D29A1A7764B) (Shutdown)
iPad Air (52F8083B-D47D-4341-8B6C-E8C74384ED91) (Shutdown)
Resizable iPhone (0ADA273B-B83E-4C9B-B8BD-350494F2C7A8) (Shutdown)
Resizable iPad (4FFB59A3-11CA-4C29-A049-C62495A2D934) (Shutdown)
— Unavailable: com.apple.CoreSimulator.SimRuntime.iOS-8-0 —
iPhone 4s (AD216DA2-6EF2-4CC5-9222-71FF8BBB5746) (Shutdown) (unavailable, runtime profile not found)
iPhone 5 (06BF26ED-6892-4BAF-9D94-5D92171A7C1A) (Shutdown) (unavailable, runtime profile not found)
iPhone 5s (142B5205-8506-4EB6-A80A-FEA8A6F022AC) (Shutdown) (unavailable, runtime profile not found)
iPhone 6 Plus (015F9A02-CC77-4F9B-9E42-77FAF7AA6876) (Shutdown) (unavailable, runtime profile not found)
iPhone 6 (6299F3DE-44AE-4D86-84E8-E2A5C883BD4F) (Shutdown) (unavailable, runtime profile not found)
iPad 2 (DF9EEDF3-A0D0-48DA-AFC4-72C96999B9D4) (Shutdown) (unavailable, runtime profile not found)
iPad Retina (A7AAA454-46E3-4D73-AB3A-FE2F1C6E5B66) (Shutdown) (unavailable, runtime profile not found)
iPad Air (40D3CE5A-9059-4D3B-96AB-B736D21D20C6) (Shutdown) (unavailable, runtime profile not found)
Resizable iPhone (8164FE9D-AE3D-45D6-8429-5A06AA870262) (Shutdown) (unavailable, runtime profile not found)
Resizable iPad (8B586B7B-C618-4C8C-A10B-47B3CE0E37EA) (Shutdown) (unavailable, runtime profile not found)
— Unavailable: com.apple.CoreSimulator.SimRuntime.iOS-8-2 —
iPhone 4s (2DA772B3-8ED2-4D2F-BB71-0CABFED9C3EC) (Shutdown) (unavailable, runtime profile not found)
iPhone 5 (C77D8C25-3D04-4E4B-B698-5E02B42B5857) (Shutdown) (unavailable, runtime profile not found)
iPhone 5s (7F057144-D6AC-4E58-BB59-60A677E97F6C) (Shutdown) (unavailable, runtime profile not found)
iPhone 6 Plus (EB5DB275-830C-4898-8F2F-FFBD23A5A3A9) (Shutdown) (unavailable, runtime profile not found)
iPhone 6 (FEE861DF-59E1-43EA-B17A-A3C289293B0C) (Shutdown) (unavailable, runtime profile not found)
iPad 2 (1F6BA798-DD20-42A3-B837-EBFFDE74C9BE) (Shutdown) (unavailable, runtime profile not found)
iPad Retina (D9B2B211-E32A-49ED-A474-D05DE16EFBE4) (Shutdown) (unavailable, runtime profile not found)
iPad Air (61256C66-4326-4646-86E6-161D6096869C) (Shutdown) (unavailable, runtime profile not found)
Resizable iPhone (09C6240A-BA0D-4875-9D6B-9D84A330D6B2) (Shutdown) (unavailable, runtime profile not found)
Resizable iPad (263A9CF2-6CBF-4A7D-9BD5-4B38323C1B5B) (Shutdown) (unavailable, runtime profile not found)

Tough to read, but I noticed the status “Booted” I was running a different iPhone 6 – GUID:  6A0CB955-C22B-48A6-A7F5-809806EB57F2, the device.plist there clearly shots it is configured for iOS 8.3.

Launched xCode and looked at the list of devices, and found the iPhone 6 with the GUID listed above, for some reason that is overriding the configuration file.  Next Task, tracking down why that is happening.

Apparently the information in appium.txt is overriding the configuration file.  In Appium.txt is list the device as “iPhone 6” which is a simulator device that can be found in

  • xCode -> Window -> Devices
    • This is how to get to “devices” in xCode 6.3.1

So I guess I need need to try fixing the images for GUID: 6A0CB955-C22B-48A6-A7F5-809806EB57F2

 

One thought on “Determining which “device” is running in the iPhone Simulator

Leave a comment