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?
-
Those of use who dealt with 7.3 as a beta have been complaining about that for weeks: http://stackoverflow.com/questions/35586056/xcode-7-3-beta-how-to-force-strict-search-for-code-autocomplete-for-objective – matt Mar 24 '16 at 17:19
-
you can download older xcode manually on the https://developer.apple.com/downloads/ , e.g. xcode 7.2.1: http://adcdownload.apple.com/Developer_Tools/Xcode_7.2.1/Xcode_7.2.1.dmg – George Mar 28 '16 at 21:20
-
43I can't believe they put out a major release with something as important as auto-complete broken. It's as if no one at Apple actually uses Xcode for development. – soleil Mar 29 '16 at 02:52
-
3This is hitting my productivity so badly that I'm reverting back to Xcode 7.2.1 so I can actually get back to normal development speed again. I'm more than usually annoyed with Apple with this one. Not only have they forced me on to El Capitan to run Xcode 7.3 but when I get there I find the promised land is far from an actuality. Do they test this stuff at all? Typical disrespect for 'their' developers, as ever. – Quintin Willison Apr 05 '16 at 17:36
-
I've decided to switch to the AppCode because of it... – matthewfx Apr 20 '16 at 03:46
-
In Cocoa (OS X), cannot, for any kind of keyword, get the viewForTableColumn (NSTableViewDelegate) to complete. Need to copy/paste manually. Unbelievable. To be clear, this is Objective-C stuff, not even Swift (of which completion was always somewhat broken). Sent a bug report to Apple. – bauerMusic May 01 '16 at 07:11
-
2Xcode 7.3.1 was released yesterday, after my tests, this bug still exists... But Apple say they fix it in 7.3.1. – Vincent Sit May 04 '16 at 09:04
11 Answers
It seems that clearing the checkbox "Enable type-over completions" in XCode -> Preferences -> Text Editing does the trick. At least in my case autocompletion fell back to a sort of old way, so it could autocomplete the class name that I had to type in manually before that.

- 166
- 5
-
-
-
To make this work you have to turn on indexing. To turn on indexing you can't do it from within Xcode. You have to execute the following line in a shell. Then restart Xcode. % defaults delete com.apple.dt.Xcode IDEIndexDisable see http://stackoverflow.com/questions/7328041/how-to-enable-indexing-in-xcode – andrewz Jul 25 '16 at 05:33
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.

- 377
- 3
- 12
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

- 13,077
- 8
- 66
- 75
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.

- 12,512
- 11
- 67
- 116
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.

- 11
- 3
-
1Did _**Cmd + Shfit + K**_ (Clean), _**Cmd + Shfit + Opt + K**_ (Clean Build Folder), closed Xcode, deleted `~/Library/Developer/Xcode/DerivedData`, rebooted OS X, and it still didn't help. :-) – TaylanKammer Apr 06 '16 at 07:48
-
1We have a pretty big project which takes 20 minutes to compile from scratch, so clean and rebuild is not an option for us... – longbow Apr 19 '16 at 08:47
Xcode 7.3.1
I will share another posible reason, that after couple of days we found out. We have multiple schemes, and in one of them, the bridging header was importing a file that didn't exist anymore. So, it didn't break while compiling and running (the header belongs to another scheme) but it caused the autocompletion to break (couldn't find any objective-c class).
Hope it would help someone!

- 461
- 4
- 8
After having tried different methods:
- Delete Derived Data
- Switching Module Enabled off in Build Settings
- Full Clean
- Relaunch
Only this worked:
- Find any commented out (/* abc */) code after @end in your files and delete.
Credit to Max_B: https://forums.developer.apple.com/thread/7439
In my case, other projects were auto-completing correctly. If all your projects fail to correctly predict code, then it might be a different issue, and the other answers might work.

- 4,136
- 3
- 35
- 55
I ran into this issue while trying to make an OS X app and I was able to fix this issue by making sure that the Xcode 7.3 documentation and the OS X 10.11.4 documentation was actually downloaded. Doing this fully restored my autocomplete functionality. My full instructions are below as well as in my answer to a similar question: https://stackoverflow.com/a/39420664/3444925
I had this problem myself and after looking through all the other similar questions & answers about this, I couldn't find a solution. However, I finally found what worked for me.
Go to
Xcode -> Preferences -> Components
. There you will probably find a screen that looks like the following:This shows that the documentation has not has not been downloaded and therefore, any attempts to re-index or re-build the application without downloading the documentation would prevent you from being able to use the autocompletion functionality.
Once I downloaded the Xcode 7.3 Documentation and the OSX 10.11.4 Documentation, this was enough for me to get the autocomplete functionality back (I was trying to build an OS X app, so feel free to download as much documentation as is relevant for you).
-
Links to external resources are encouraged, but please add context around the link so your fellow users will have some idea what it is and why it’s there. Always quote the most relevant part of an important link, in case the target site is unreachable or goes permanently offline. – pableiros Sep 09 '16 at 23:24
-
I didn't run into this until I created a couple of new class files. Other classes worked fine, but autocomplete would NOT work for anything in the new files...
FIX (for me) - I had to add those files to ALL of my targets, including the unit test targets even though I wasn't using them yet.

- 2,620
- 23
- 27