Xcode 7.3 autocomplete is so frustrating

2019-01-12 18:45发布

There is a new autocomplete in Xcode. Probably might be useful because it checks not only beginning of names etc. But I found that very often it doesn't find a class name or a const name at all etc. I need to type in entire name by myself. Over all I found it makes my life harder and coding more time consuming. Is there a way to switch to the old way it used to work?

11条回答
在下西门庆
2楼-- · 2019-01-12 19:12

I have the impression that some 'parts' of autocompletion simply fail after a while. I use to restart the Mac to get it back working. But sometimes it fails quite soon again. Maybe the answer of @Alex Bykov combined with a restart will do the trick.

Anyway: auto-completion of Xcode always was crap. AppCode used to get it much better. Unfortunately not yet with swift.

查看更多
▲ chillily
3楼-- · 2019-01-12 19:12

it doesn't find a class name

As a work-around, you can try to press Command + Shift + K and Command + B Several times,it works temporarily.

查看更多
4楼-- · 2019-01-12 19:13

Closed Xcode, opened Xcode, let it index, it worked.

查看更多
Rolldiameter
5楼-- · 2019-01-12 19:15

just open Xcode derived data folder and delete the folder

/Users/yourUserName/Library/Developer/Xcode/DerivedData

then restart Xcode, now autocompletion works like a charm

查看更多
你好瞎i
6楼-- · 2019-01-12 19:18

Xcode 7.3.1

  1. In Xcode > Preferences > Text Editing

    uncheck Enable type-over completions

  2. restart Xcode

查看更多
唯我独甜
7楼-- · 2019-01-12 19:18

This is by no means an adequate solution, BUT it has allowed me to (barely) maintain my sanity the past few days: After every build, you need to trash your Derived Data folder. You can find this folder in Xcode > Preferences > Locations > Derived Data. Just trash the whole thing and it'll kick off a re-indexing step that should restore proper autocomplete functionality. Unfortunately, I've found that once I build, the autocomplete behavior reverts to its broken state.

查看更多
登录 后发表回答