Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24888] iOS: Xcode 9 does not store Simulator state when having multiple installations, forces new Simulator launch at every build

GitHub Issuen/a
TypeBug
PriorityMedium
StatusResolved
ResolutionCannot Reproduce
Resolution Date2018-02-13T09:05:55.000+0000
Affected Version/sRelease 6.1.0
Fix Version/sn/a
ComponentsiOS
Labelscb-tooling
ReporterHans Knöchel
AssigneeChris Barber
Created2017-06-23T22:12:47.000+0000
Updated2018-02-13T09:05:55.000+0000

Description

When using the iOS 11 Simulator on Xcode 9, a new Simulator instance is created on every build. It does not cache the current state and instead kill the sim to launch it again. It takes around 15 seconds more than in a recurring build (e.g. Xcode 8).

Comments

  1. Chris Barber 2017-08-28

    I could see this happening if you have multiple Xcodes installed and the CLI picks a different Xcode to list the Simulators than the Xcode used to build the app. This means ioslib needs to spin up one version of the CoreSimulator service to get the list of simulators and another version to launch the simulator. I'll have to investigate more, but I suspect that simctl for a Xcode version different from the one that is building the app cannot accurate detect the state of the simulator. We may need to extend ioslib to allow the Titanium build to influence which Xcode version to use to query the simulators.
  2. Hans Knöchel 2017-08-28

    If it's only happening with multiple Xcode installations installed, we should be okay! What do you think about the idea of booting the sim early (mentioned in the other ticket we talked about)?
  3. Chris Barber 2017-08-28

    Yes, we should boot the iOS Simulator as soon as possible. This is not a major change, but can be tricky. If this can wait, then I can tackle this in sprint 19 or 20.
  4. Eric Merriman 2017-10-09

    [~amukherjee] Can you try this with 6.3.0 Chris merged a new iOS lib.
  5. Abir Mukherjee 2017-10-09

    Environment used: Node Version: 6.10.3 NPM Version: 3.10.10 Mac OS: 10.13 Appc CLI: 6.2.4 Appc CLI NPM: 4.2.9 Titanium SDK version: 6.2.2 and 6.3.0.v20171006185117 Appcelerator Studio vers 4.10.0 Xcode 8.3. and Xcode 9.0 [~emerriman] I tried this on the latest SDK build 6.3.0.v20171006185117, and with an older build (6.2.2), and did not get multiple instances of Simulator when I built multiple times. I also tried the case with multiple Xcode versions installed on my machine, and had only one instance of Simulator running with multiple runs.
  6. Hans Knöchel 2017-10-11

    [~amukherjee] Was this confirmed by another dev as well? We need to ensure this one is included in the RC.
  7. Chris Barber 2017-10-11

    I haven't been able to reproduce this issue in the recent past. ioslib@1.6.0 (which is already in 6.3.0) changes how it detects running simulators and so this may no longer be an issue.
  8. Hans Knöchel 2018-02-13

    Resolving as Cannot Reproduce in newer versions of the SDK. If our community community still experiences this issue in 7.0.0+, let us know!

JSON Source