Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-24837

ioslib: Unable to autoselect iOS 10.3.1 sim with Xcode 8.3.3

    Details

    • Type: Bug
    • Status: Closed
    • Priority: None
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 6.1.1, ioslib 1.4.8
    • Component/s: Tooling
    • Labels:
      None
    • Sprint:
      2017 Sprint 13 Tooling

      Description

      Xcode 8.3.3 introduced iOS SDK 10.3.1 which causes some troubles for ioslib. ioslib ties the simulator to the iOS SDK tied to the simulator runtime in the runtime's plist file, which is "10.3" even for "10.3.1". ioslib cheats and skips this and just associates the sim with the iOS SDK installed with Xcode.

      Since Xcode 8.3.3 comes with iOS 10.3.1, ioslib will naively define an iOS 10.3.1 simulator.

      When autoselecting a simulator, it scans the Xcode iOS Simulators, namely 10.3.1, and tries to load the simulator details, which are associated to the iOS SDK tied to the sim runtime. In this case, the 8.3 sim runtime is tied to iOS SDK 8.3 as defined in the sim runtime's plist.

      When ioslib tries to lookup a 10.3.1 simulator, it won't find any matches and hence the error:

      [TRACE] [ioslib] No iOS Simulator UDID specified, searching for best match
      [TRACE] [ioslib] Scanning Xcodes: 8.3.3:8E3004b
      [ERROR] Unable to find any Xcode installations that supports at least iOS 10.
      

      The solution is to create a distinct list of iOS SDKs associated to each sim runtime based on both the sim runtime's plist and the output from simctl. While the plist will return "10.3", simctl will return "10.3.1". We can then loop over each version and define the same simulator for both iOS SDKs. Redundant? Yes. Does it work? Yes.

      On a side note, there's a small bug where the correct simulator is being selected, but the wrong Xcode version. It is supposed to pick the most recent Xcode that supports the selected Xcode. However there's a bug where we A) don't filter unsupported Xcodes and B) we don't break the loop after the first recent match resulting in the oldest Xcode being selected.

        Attachments

          Activity

            People

            • Assignee:
              cbarber Chris Barber
              Reporter:
              cbarber Chris Barber
              Reviewer:
              Jan Vennemann
              Tester:
              Abir Mukherjee
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-10789
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code