简体   繁体   中英

Xcode 8 simulator extremely slow

I am running Xcode 8 on macOS Sierra 10.12.2, and there seems to be a problem with running the simulator on my first "Hello World!" app (simulating iPhone 7 Plus). As you can see, I am very new at app development.

The simulator gets stuck at the loading bar with the Apple logo for about 10 to 15 minutes, and then gives me the message of "The operation couldn't be completed. (Mach error -308 - (ipc/mig) server died)".

I dug around the web and found solutions suggesting to go to Product > Clean in Xcode, also Simulator > Reset Content and Settings... in Simulator.

After which, the system gets stuck at the spinning clock for about 20 minutes and gives me the error message "Unable to contact local DTServiceHub to bless simulator connection" (solution I found online tells me to "Reset Content and Settings...")

I'm just really lost here because the error codes seems inconsistent in ways I cannot explain. Maybe it is my laptop? (Early 2011 MacBook Pro 15" 4GB ram, 2.2GHz Corei7)

Thank you in advance for your effort to help me.

On older/slower Macs the first run of an App on a simulator will be slow like this and an error often occurs:

The Apple logo bit is the simulator initialising (just like a real device when you cold start it) - just be patient and let it finish.

The error I suspect is something in XCode timing out due to be excessive delay. If this happens don't clean, just re-run: the simulator should not need to re-initialise so everything should be quicker and on my slow Mac setup the error does not tend to re-occur (unless I shut down or close the simulator - in which case I have to wait for it to re-initialise again!)

Helpfully you can manage without getting a new Mac :o)

I usually do this on Xcode 8.3.3.

  1. Uncheck Debug->Optimize Rendering for Window Scale
  2. Check again Debug->Optimize Rendering for Window Scale
  3. It will work now

No Xcode simulator is not slow, It may be because slow animation is checked

Select Simulator Debug Option and uncheck slow animation

That's work for me. Hope it works for you

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM