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 06:57

After a long time of searching, I finally fixed the issue for me. In Xcode > Preferences > Text Editing, in "Code Completion", I had "Use Escape key to show completion suggestions" checked for some reason. As soon as I unchecked this box, auto completion worked like a charm, without even needing to restart Xcode! (Xcode 10)

查看更多
Deceive 欺骗
3楼-- · 2020-02-16 06:57

Build errors can break the autocompletion feature in Xcode.

查看更多
啃猪蹄的小仙女
4楼-- · 2020-02-16 06:58

This works for me:

  1. Save a backup of all the project file somewhere.

  2. Delete the project.

  3. Create a new project and add all the files.

  4. And it automagically works.

查看更多
我想做一个坏孩纸
5楼-- · 2020-02-16 06:59

Please try doing this:

Select the file >> check if the file is added to UITesting or UnitTesting targets (File inspector -> Target Membership). If so, please uncheck those two and make sure only the project target is selected. Then build and try if autocomplete is working fine.

This worked for me. Hope it help someone.

查看更多
The star\"
6楼-- · 2020-02-16 07:01

With Xcode 11.1, simply performing Clean Build Folder or deleting derived data was not enough to fix autocomplete.

Only after restarting my Mac, everything was back to normal

查看更多
太酷不给撩
7楼-- · 2020-02-16 07:02

Try:

  1. Go to Xcode > Preferences > Text Editing
  2. Under Code completion - Uncheck 'Suggest completions while typing'
  3. Quit out of Xcode and then relaunch Xcode.
  4. Go to Xcode > Preferences > Text Editing again
  5. Quit out of Xcode and then relaunch Xcode.
  6. Now go to Code completion and check 'Suggest completions while typing'.
  7. Try typing library function or enum and enjoy!
查看更多
登录 后发表回答