Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Waiting for {simulator/device} to start

With Xcode 9.3 (beta), I'm facing an issue with Xcode tool, while I try to build/run the application (project) for the first time, after Xcode launch/start.

Several times, it prevents project build with the message on status bar:

Waiting for iPhone-X to start

While my simulator is already started and working (There is no any activity, going on, in the simulator).

Here is reference snapshot:

enter image description here

As a temporary solution, I force close Xcode (9.3) and start again.

enter image description here

Is there anyone facing the same issue with Xcode 9.3 beta?

Update: Same issue in Xcode 9.3-Beta 2 also.

like image 742
Krunal Avatar asked Feb 05 '18 09:02

Krunal


People also ask

How do I connect my iPhone to simulator?

For iOS, tvOS, and watchOS apps, you can choose a simulated device, under [Platform] Simulators, from the run destination menu next to the scheme menu in the toolbar. To add additional simulators of a product family running older versions of the operating system, choose Add Additional Simulators.

How do I remove simulator from Xcode?

To delete individual, available, simulators it's easier to do so through Xcode. Go to Window > Devices and simulators, then select the Simulators tab. You can right-click on any simulator and select 'delete' to get rid of it.


2 Answers

Here is How I fixed:

Due to quirks (most likely Simulator bugs) in the Simulator launching on both Xcode 8 and 9, there is no common code to have it launch successfully on both Xcodes. Through experimenting, I have found these to be most reliable:

Xcode 9:

killall Simulator
xcrun simctl boot <device_id>
open `xcode-select -p`/Applications/Simulator.app

Xcode 8:

killall Simulator
xcrun simctl shutdown booted
xcrun instruments -w <device_id>

refer: [iOS 11][Xcode 9] launch, install, start hangs Simulator #209

like image 173
MichaelMao Avatar answered Oct 01 '22 09:10

MichaelMao


What (most of the time) works for me, is first launch it on a device. Kill it and then run it on a simulator.

like image 29
basvk Avatar answered Oct 01 '22 08:10

basvk