I\'m currently developing an iOS app using swift and Xcode 6 (Beta 3).
Everything went fine so far but now as my project grows, Xcode suddenly began indexing and it
Yet one possible thing, that may cause such behavior: For debugging purpose I changed system time, set up in one week ago - and I've got infinite indexing. As soon, as I set time back - indexing has stopped.
Too many string concatenations in one line cause troubles. Helped me too. Originally was pointed by Zhenshan Yu there: Xcode 6 Beta not compiling
I've tried all the things listed, indexing is keep freezing. This helped me: If your indexing is freeze, and you have one or more swift process eating 99% of your cpu - just kill this swift task(s), wait a bit, and progress should move. It can repeats, until it reaches finish, in my case I killed the process 7 times, but at the end, indexing was completed!
My particular problem was a fairly long literal dictionary containing much data. My solution was to understand that XCode indexing wasn't "stuck", but just taking a long time. So I only had to wait more time than I expected.
For me, I made a stupid mistake. I write a Class like this:
class A: A {
.......
}
A class inherit itself that causes the freezing. There is no message hint from Xcode. You can just take this as possible reason ~ .
I had the same problem with one call adding 11 NSLayoutConstraint objects to an array.
The solution was to divide the code into several calls, each adding only 3 objects to the array. Weird.
That was in Xcode 6.4