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:43

This can also happen if you redundantly named your files. For example,

Data.swift

Data.swift

查看更多
够拽才男人
3楼-- · 2020-02-16 06:43

For me it was happening in my test file, because it wasn't part of a target for some reason. Setting it's target membership solved the issue.

查看更多
何必那么认真
4楼-- · 2020-02-16 06:44

Problems mostly because there are missing location of some files in project navigator (build errors)

  1. Press command+1 to open Project Navigator pane
  2. Check if there are any missing files

Or you can:

  1. Delete DerivedData (command+shift+K)
  2. Clean build folder (command+shift+option+K)
  3. Press build again (command+B)
  4. You should see build error that Xcode could not find some files that prevent build tool to process auto complete.
  5. Correct and fix any missing files that you see.

Hope this helps

查看更多
别忘想泡老子
5楼-- · 2020-02-16 06:46

I would like to add one more to the pile of solutions, because it is the only one that worked for me and is nowhere to be found here.

Xcode normally comes with two default build configuration for every project. Release & Debug. I have an extra one for my unit tests called Testing. In Xcode 10.1, 10.2, 10.3 and 11 beta, the new build system does not seem to like it and will only auto-complete if you either use Release or Debug. Any custom build configuration breaks auto-completion in mixed (swift + objc) project with unit tests.

查看更多
太酷不给撩
6楼-- · 2020-02-16 06:46

Xcode 11.3, macOS catalina

process parsecd achieve 100% of cpu, so kill it helps me

查看更多
一夜七次
7楼-- · 2020-02-16 06:47

Deleting the DERIVED DATA folder seemed to fix my issue. Thanks to this post: swift println() not showing autocomplete options while writting code

查看更多
登录 后发表回答