[TIMOB-24888] iOS: Xcode 9 does not store Simulator state when having multiple installations, forces new Simulator launch at every build
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Resolved |
Resolution | Cannot Reproduce |
Resolution Date | 2018-02-13T09:05:55.000+0000 |
Affected Version/s | Release 6.1.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | cb-tooling |
Reporter | Hans Knöchel |
Assignee | Chris Barber |
Created | 2017-06-23T22:12:47.000+0000 |
Updated | 2018-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).
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 thatsimctl
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 extendioslib
to allow the Titanium build to influence which Xcode version to use to query the simulators.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)?
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.
[~amukherjee] Can you try this with 6.3.0 Chris merged a new iOS lib.
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.
[~amukherjee] Was this confirmed by another dev as well? We need to ensure this one is included in the RC.
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.
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!