Xcode stuck on Indexing

A project I've been working for 2 months stopped working for no reason because Xcode got stucked on "Indexing". I can't Build the project anymore. If I try to build, Xcode freezes and I have to force quit. This happens only with this project.

I tried cleaning all derived data but didn't help.

I'm using Xcode 4.5.2.

Any ideas?


Solution 1:

  1. Open your Project Folder.
  2. Find ProjectName.xcodeproj file.
  3. Right-Click Copy and Paste to Safe Place.
  4. Right-Click Show Package Contents.
  5. Find project.xcworkspace file and delete that file.
  6. Reopen Your Project and clean and Rebuild.

If your problem is not solved then replace the file with your backup file.

Solution 2:

  1. Close that project from Xcode
  2. Open Xcode Organizer, find the problematic project
  3. Delete Derived Data folder in the Organizer
  4. Close/re-open Xcode

Nuking Derived Data is the first thing to try in all cases of Xcode misbehaving

Solution 3:

I had this exact problem, it was caused by a 20 item array literal. Had to switch to different syntax. Pretty silly.