Xcode compile time too long


#1

Hello,

I know this question doesn’t belong here but I need help to figure out a solution to this problem because Apple support hasn’t responded since almost 3 months.

Version 9.2 beta (9C34b)
MacBook Pro (13-inch, Early 2011)
macOS HighSierra version 10.13.1 (17B48)

Every time I compile a program in Xcode it takes atleast 7 minutes to simulate the application. Around 90% of attempts, the program doesn’t even compile inspite of generating a successful build. Common error messages that show up are the following :
Timed out waiting for the simulator application for iphonesimulator to become ready
Could not attach to pid : "1050"
Failed to initiate service connection to simulator

Can anyone please help me ?

Warm regards.


#2

I guess the problem you met is related to the newest MacOS, but I’m not sure about it since I don’t use Xcode to program. Had Xcode worked well before you updated to Mac HIgh Sierra? When I used Android Studio at first, I had trouble as well. The AVD manager didn’t work for failure of installing HAXM which is imcompatible with Mac High Sierra. Fortunately, I searched solutions online and finally found the newest version of HAXM. Now it has been working well with my MBP. These imformation I mentioned above seems useless to solving your problem, but I wish you could find the right way to handle it.
best regards.


#3

@kafka : Thanks for taking the time to answer my question. Unfortunately I had the same problem before updating my OS to MacOS High Sierra. In fact I was hoping the move to MacOS High Sierra would solve the issue. I created a bug report on the Apple Developer Support system and even sent them my sysdiagnose. It has been 3 months and they haven’t responded yet. It is very frustrating because I am spending more time on sorting that problem out and not on the actual coding. All the best and warm regards.


#4

@Sujay

Hi. This is way too long to be stumped like this. Did you try some google-fu? I’m yet to dig into swift development, but was searching for Xcode compile tricks and came across your issue.

Have you seen any of these?

https://stackoverflow.com/questions/11535844/failed-to-attach-to-process-id-xcode

https://stackoverflow.com/questions/39856001/xcode-8-beta-simulator-fails-to-run-app-after-accidentally-running-xcode8-simula

What appears to be happening is that the process number is already running. You said this was on a laptop? Do you restart that machine ever? It almost seems as if you have a zombie process running from an earlier version of Xcode.

You can try to see if the process is simply running already by:

ps -p 1050 in a terminal
If it is go ahead and kill -9 1050


#5

Hello Boredomdenied,

Sorry for the delay in replying. Thanks for taking the time to answer my question.

I have restarted the machine as well as tried other solutions suggested on stackoverflow with no success. I was so fed up of the absence of support from Apple that I switched to Kivy to program applications for iOS. I might come back to retry the solutions proposed in the links you have shared but for the moment, I really am not in a position to waste any more time on Apple’s Xcode.

Thank you anyways.

Sujay