ios-control / ios-sim

Command-line application launcher for the iOS Simulator
Apache License 2.0
1.49k stars 253 forks source link

[6.x & Xcode 9] launch restarts simulator if already running #223

Closed nevir closed 5 years ago

nevir commented 6 years ago

(Not sure if this is a change in behavior to ios-sim 5.x -> 6.x, or the new simulator)

Expected behavior

When calling ios-sim launch, and the simulator is already running, it should just install/launch the desired app

Actual behavior.

The simulator exits, and then starts again, before installing/launching the desired app

Steps to reproduce the problem

ios-sim start --devicetype "..."
# Wait for it to start
ios-sim launch --devicetype "..." "..."
# Observe that the simulator exits & then restarts

System Specs

> system_profiler SPSoftwareDataType
Software:

    System Software Overview:

      System Version: macOS 10.12.6 (16G29)
      Kernel Version: Darwin 16.7.0
      Boot Volume: Macintosh HD
      Boot Mode: Normal
      Computer Name: NevBook
      User Name: Ian MacLeod (ian)
      Secure Virtual Memory: Enabled
      System Integrity Protection: Disabled
      Time since boot: 2 days 16:06

> ios-sim --version
6.1.2

>xcodebuild -version
Xcode 9.0
Build version 9A235

> xcode-select --print-path
/Applications/Xcode.app/Contents/Developer

> node --version
v6.2.1
surajpindoria commented 6 years ago

Hi @nevir,

Unfortunately due to some quirks dealing with Xcode 8 and Xcode 9 this is the new behavior for the time being. I have posted a thread below that discusses this a little further. Hopefully if some of the issues around the simulator and new Xcode get resolved in the future we can update this again.

https://github.com/phonegap/ios-sim/issues/209#issuecomment-330042127

marcocarosi commented 6 years ago

Opened an issue to the simctl library, which is the place this issue originates, see: https://github.com/phonegap/simctl/issues/16 There you can find a proposed patch.

shazron commented 5 years ago

See #237 which will fix this issue

ghost commented 3 years ago