Xcode 8.2.1 crashes on opening project with array index out of bounds
Solution 1:
Ok, well I managed to fix this issue by deleting my .xcworkspace directory and recreating it via pod install
. Xcode opens and I'm able to build my project.
Edit: As others have suggested a better solution is to delete the xcuserdata directory from within .xcworkspace. This is faster as you don't need to re-run pod install every time.
Solution 2:
The correct answer is from Lukasz's comment:
-
Right click on the file
.xcworkspace
> Show Package Contents -
Delete the
xcuserdata
folder
And now Xcode will open the project workspace just fine.
Solution 3:
For others experiencing a similar issue, but this only happens when the Find Navigator is toggled in the navigator area. Try clicking on the Project Navigator or CMD + 1
repeatedly upon launch. Sounds funny but it works.
Solution 4:
Besides deleting the xcuserdata
folder in the project's workspace directory, I was also able to remedy this particular crash by deleting derived data (either for the project that was open while Xcode crashed, or for all projects) at ~/Library/Developer/Xcode/DerivedData
. Last time Xcode crashed I had to do both things to be able to start Xcode again, so I think deleting both is your safest bet (for now at least).