Xcode swift indexing forever

前端 未结 25 1688
不知归路
不知归路 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:21

    It's definitely a Xcode bug and I reported that to Apple. When you have a large dictionary literal or a nested dictionary literal. You have to break your dictionary to smaller parts and add them with append method until they fix the bug. Xcode 8.2.1 (8C1002)

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

    I too faced the same issue for Xcode 9.1. So i looked into Activity Monitor. There was swift process which was above 100%. Double Clicked it and Quit. Done. Now its working fine.

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

    in my case i had the emulator open with an app builded with previous files. Just close de emulator

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

    I was creating a dictionary like this

     var dic1 = [
    
                "isDestination" : self.isDestination ?? false,
                "price" : self.price ?? ""
    
            ]
    

    and self.price is of type Int and I was giving its fallback value as an empty string which screwed up the XCode compilation.

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

    I had that problem when I was at the swift crunch in krakow a couple weeks ago. We had the code on github, experienced that indexing problem on a macbook, we tried pulling the repo on 2 other macbooks, same result.

    It's clearly a bug, I don't know what is causing it, we tried whatever we could think of (clean, clean build folder, manually removing files not in the repo, rebooting, killing processes, etc.), and after a couple hours the only thing left to do was creating a new xcode project from scratch and manually importing the files from the other project.

    Never happened again since then, neither on that nor on other projects.

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

    I went to tools->task and contexts->clear contexts and that seemed to give the computer rest finally!

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