Xcode 9 Autocomplete Not Working 100% - Partially

2020-02-16 06:27发布

This morning, Xcode 9.0 (9A235) shows a new/strange Auto Complete box that is not at all what it used to be. How do I get the full auto-complete box so that autocomplete looks like how it usually does?

enter image description here

30条回答
劳资没心,怎么记你
2楼-- · 2020-02-16 07:02

Here's a bit of workaround but works.

  1. Clean the project... Command + Shift + K

  2. Clean the build folder... Command + Shift + Options(Alt) + K

  3. Delete derived data for the project... This can be done with the help of this link:

    How can I delete derived data in Xcode 9?

  4. Close XCode.

  5. Reopen XCode (let the indexing complete) and Build the project... Command + B

Once it will be done with building, The suggestions will be back. I have tried it twice.

查看更多
甜甜的少女心
3楼-- · 2020-02-16 07:02

In my case (Xcode 11.1), It happened when I stopped Xcode auto-indexing with this command defaults write com.apple.dt.Xcode IDEIndexDisable -bool true.

So I rolle back it with defaults write com.apple.dt.Xcode IDEIndexDisable -bool false. then restart macOS and run again Xcode.

查看更多
男人必须洒脱
4楼-- · 2020-02-16 07:03

This Link helped me. Open the Build Settings & fill the framework search paths. See the below image.

enter image description here

查看更多
我欲成王,谁敢阻挡
5楼-- · 2020-02-16 07:04

Xcode Version 11.0 (11A420a)

I have tried the solution from Lal Krishna for Xcode V11.0. It worked a few times but later I got no result.

I found one solution. You must delete two files:

  1. Library/Developer/Xcode/Derived Data (as described before)
  2. Library/Developer/Xcode/UserData/IDEEditorInteractivityHistory

That solution helps me now. May be useful for others

查看更多
Animai°情兽
6楼-- · 2020-02-16 07:04

It seems to be file specific in my case (Xcode 9.2) For me the fix was:

  1. Delete problem file (remove reference)
  2. Clean and Build
  3. Add file back into the project (I did not check test targets)
  4. Build again

Finally after 3 hours of trying everything - autocomplete works as it should.

查看更多
时光不老,我们不散
7楼-- · 2020-02-16 07:04

Had the same problem with Xcode 11.3. Nothing above didn't help, it turned out that I had build errors. Just fix the build errors and autocompletion will work again.

查看更多
登录 后发表回答