Xcode swift indexing forever

前端 未结 25 1684
不知归路
不知归路 2020-11-30 03:15

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

相关标签:
25条回答
  • 2020-11-30 03:19

    I had this issue with XCode 6.3 when creating a C++ project. Before switching over to developing in SubLime, my last ditch effort was to delete the XCode app and reinstall. It was a long process, but my version of XCode is now updated to 7.3 and everything is working as it should.

    So if nothing else seems to be working, you could try deleting XCode from your applications folder and then reinstalling. Just be sure you aren't deleting any project files you want to keep.

    0 讨论(0)
  • 2020-11-30 03:19

    This is a workaround I posted on another stackoverflow thread related to Xcode indexing problem. This question looks to be more swift related but my workaround can probably be useful here too. So here it is. My project is very big (merging objective c, c++, swift, and java files with j2obj) and none of the answers here solved the indexing problem. The idea is to limit the CPU usage of the Xcode indexing process with an external tool like cputhrottle.

    So first you need to install cputhrottle in terminal

    brew install cputhrottle

    Then limit the Xcode indexing process like this (20 = 20%)

    sudo cputhrottle $(pgrep -f com.apple.dt.SKAgent) 20

    I've exposed my "solution" here with more details : How to prevent Xcode using 100% of CPU when indexing big projects

    0 讨论(0)
  • 2020-11-30 03:20

    Happened to me with Xcode 7.3

    Had to clean everything Xcode had cached to solve it.

    Solution:

    rm -frd ~/Library/Developer/Xcode/DerivedData/*
    
    rm -frd ~/Library/Caches/com.apple.dt.Xcode/*
    
    0 讨论(0)
  • 2020-11-30 03:20

    Solved it: I deleted the most recently added files from the project and the problem disappeared. Then I started to add back the files, one by one until the problem reappeared. So I found the file causing the problem. Then I deleted the most recently added code from that file and again, the problem disappeared.

    That way, I found a piece of code which was responsible for that behavior.

    0 讨论(0)
  • 2020-11-30 03:20

    I had this same issue and it took me FOREVER to solve it. I'm pretty sure I've seen every question on the internet about this issue and I tried all of the solutions. Turns out all I had to do was....

    Restart my computer

    0 讨论(0)
  • 2020-11-30 03:20

    Mine was about dragging a new file with String extension to the project and not adding it to all required targets. Hope that helps someone.

    0 讨论(0)
提交回复
热议问题