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?
-
4Deleting the DERIVED DATA Folder solved it for me. Thanks to another post. Thanks to this post: https://stackoverflow.com/questions/28429630/swift-println-not-showing-autocomplete-options-while-writting-code?rq=1 – Ernie Sep 30 '17 at 17:38
-
Probably it is because _indexing_ hasn't been completed yet. – Ozgur Vatansever Sep 30 '17 at 18:19
-
1Tried every proposed solution and nothing helped with one of my projects – Alexander Vasenin Nov 15 '18 at 19:45
-
311.3 is a disaster regarding this issue. Often just restarting Xcode helps :/ – Fattie Jan 01 '20 at 00:29
-
https://stackoverflow.com/a/13834705/11921619 – Jafar Khoshtabiat Aug 17 '20 at 10:54
36 Answers
Try:
- Go to Xcode > Preferences > Text Editing
- Under Code completion - Uncheck 'Suggest completions while typing'
- Quit out of Xcode and then relaunch Xcode.
- Go to Xcode > Preferences > Text Editing again
- Quit out of Xcode and then relaunch Xcode.
- Now go to Code completion and check 'Suggest completions while typing'.
- Try typing library function or enum and enjoy!

- 15,485
- 6
- 64
- 84
-
6
-
2
-
Still required in Xcode 11.2, thank you for this weird life hack :-) – Rocket Garden Nov 25 '19 at 11:36
-
This a a bug in Xcode as always new updates creates new problems, the working solution for me is: 1- Quite Xcode. 2- wait few seconds. 3- Open Xcode but don't touch anything not even clicking somewhere in the editor. 4- Wait till indexing is finished. Autocomplete works now. – Shahriyar Feb 09 '20 at 14:28
-
Xcode 11.4 beta (11N111s) is fundamentally broken here. Neither autocomplete nor "jump to definition" work. The suggested solution above does not resolve the issue. – 100grams Feb 15 '20 at 08:50
-
This means since 2 years, this issue has not been resolved by Apple. – Kedar Sukerkar Jul 01 '20 at 08:37
-
This _half_ worked - it went from showing "No completions" to only showing...fields but not methods? Stuff from the class but not its superclasses? Not sure. – Erhannis Jul 17 '20 at 22:16
-
5Still necessary in XCode 11.5, Catalina, July 2020. Thanks so much! – Reuben Scratton Jul 28 '20 at 13:00
-
1Same here. It still happens in Xcode 11.6, Cataline, and August 2020. Solved by following the steps in the answer. – lishrimp Aug 11 '20 at 04:42
-
1Wow. XCode 11.7 still an issue and this works (just wait a few moments). Thank you! – iOS Blacksmith Sep 28 '20 at 09:48
-
1miracle bro, still is an issue even in Xcode 12/catelina 10.15.4 October 2020 – Heshan Sandeepa Oct 30 '20 at 10:19
-
3Had same issue with Xcode 12.1 and Catalina 10.15.7 Nov 20... Step 4 and 5 were not necessary for me – Shaihi Nov 03 '20 at 08:44
-
2
-
d= (-_- ) thanks, but would someone report this to Apple in the next years please, I recommend 2030 maybe!? (worked great and didn't even need to delete `~/Library/Developer/Xcode/DerivedData/` folder's contents). – Top-Master Mar 22 '21 at 15:30
-
Deleting the DERIVED DATA folder seemed to fix my issue. Thanks to this post: swift println() not showing autocomplete options while writting code

- 2,421
- 2
- 11
- 12
Things to try: #1 Run this command in the project directory if you use cocoapods:
rm -rf ~/Library/Caches/CocoaPods;
rm -rf Pods; rm -rf ~/Library/Developer/Xcode/DerivedData/*;
pod deintegrate; pod setup; pod install;
#2 **Clean Cached Data**
Clean the Project -> Cmd+Shift+K
Clean the Build Folder -> Cmd+Shift+Option+K
If you skipped step one:
Delete Derived Data
Xcode Preferences
-> Locations
->
Arrow Symbol Takes you to DerrivedData
-> Delete Folder
#3 **Check your Build Phase's Compile Sources.**
Every .swift
and .m
file in the project should be in this list or it won't autocomplete in those files.
#4 **Optimize your Editor:**
Use fileprivate* on every class property and function that you can to reduce the scope of the Compilers work per item.
Write modular/OOP code so you have less code for the compiler to read.
Avoid using Type Inferance when the result is a complex calculation, and try to break down complex calculations into let this = smallerOperation
statements
* In Swift 4 private became stricter than fileprivate
In Xcode 12 there have been significant improvements in how often deleting derived data is necessary (though freezing has increased).

- 3,046
- 1
- 24
- 42
-
With XCode 9.2 there isn't an Arrow Symbol anymore to the Derived Data Folder. Thanks for the fileprivate tip. The nightmare continues... – Sal Jan 02 '18 at 15:05
-
I still see the arrow symbol. Was this in an earlier version of 9.2 or something? – Sethmr Jan 18 '18 at 17:39
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:
- Library/Developer/Xcode/Derived Data (as described before)
- Library/Developer/Xcode/UserData/IDEEditorInteractivityHistory
That solution helps me now. May be useful for others

- 341
- 3
- 3
-
5worked for me. I just want to say that Visual Studio 2002 (!) was better then Xcode 2009-2019. All this years, Xcode is so buggy. I don't understand why Apple does not care about the developers. Xcode made by developers ! ( I had to get it out) – user1105951 Dec 05 '19 at 16:56
-
That's works for me: Quit Xcode, remove 2 folders as you said, relaunch Xcode and every problems gone :D – phuongzzz May 30 '20 at 10:50
-
tried to do that with new Xcode 13.2.1 and these not help unfortunately. – hamsternik Jan 31 '22 at 22:37
This can happen when the file is not a member of the Target. Open the file where autocomplete is not working and show the the "Utilities" tab in the top right of Xcode (blue in the screenshot below).
Ensure your Target (typically your app's name) is checked. Autocomplete should work almost instantly without restarting Xcode, cleaning, or deleting Derived Data.
If it is already checked, make sure to uncheck and recheck it again. For me, it did the trick.

- 806
- 7
- 12

- 2,574
- 1
- 22
- 35
-
only opening that page and closing worked. I'm confused. Thanks btw. – Okhan Okbay Mar 10 '18 at 06:08
-
It worked on xcode 10. The file was indeed already member of the target. I had to un-check then check it again into being recognised as such. – Jim75 Oct 13 '18 at 12:34
-
this happened to me after git merge I guess one branch wrote over my current project file and the other did not merge correctly into that. – Asfand Shabbir Oct 18 '18 at 06:51
-
Unchecking and checking back again worked for me! What I have found is that simple malfunctions like this have basic solutions in XCode. Keep scrolling down the stackoverflow answers. – Parajuli Roman Dec 22 '20 at 15:32
I'm using Xcode 10.2 and I had the same issue.
This answer from axel helped me to fix.
Anyway, I'm going to describe a bit more:
- Go to
YourProject.xcodeproj
by clicking with Right Mouse Click and openShow Package Contents
- Go to
xcuserdata
and delete youryouruser.xcuserdatad
If you have also the xcworkspace
(if you already have any pods installed) then do step 3&4, if not then just skip step 3&4:
- Go to
YourProject.xcworkspace
by clicking with Right Mouse Click and openShow Package Contents
Go to
xcuserdata
and delete youryouruser.xcuserdatad
Quit Xcode
- Delete Derived Data by using Terminal:
rm -rf ~/Library/Developer/Xcode/DerivedData
- Open Xcode and check if it works.

- 6,215
- 1
- 37
- 40
This can also happen if you redundantly named your files. For example,
Data.swift
Data.swift

- 12,189
- 5
- 77
- 85
-
1In my case this was the issue, I have same file name in 2 different folder – Raj Aug 24 '19 at 02:43
-
-
1In my case I had a virtual group named ABC and a file within that group named ABC.swift. Renaming the file fixed this. Thanks – Rem-D May 28 '20 at 14:41
Here's a bit of workaround but works.
Clean the project... Command + Shift + K
Clean the build folder... Command + Shift + Options(Alt) + K
Delete derived data for the project... This can be done with the help of this link:
Close XCode.
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.
Update:
Sometimes the issue can be as simple as Duplicate file names. Carefully check if any new file names added by you are conflicting with older files.
In Xcode 11.4, even if you move an existing file to another group, the suggestions disappear. This can be cured simply by restarting Xcode.

- 598
- 7
- 12
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)

- 47,830
- 31
- 106
- 135

- 1,433
- 3
- 17
- 37
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.

- 5,752
- 5
- 46
- 70
For Xcode 11.4 (11E146)
Back Slash in folder name breaking the autocompletion feature, If this is the case remove it and build again.

- 8,149
- 3
- 38
- 45
I added here what was going on in my project just in case it can help someone else... I had 2 files with the same name and I didn't realise.

- 2,886
- 3
- 25
- 43
Just lost a day trying to solve the autocomplete nightmare of Xcode (9.2). Deleting derived data seemed to work briefly then things reverted. Reboots etc and other suggested voodoo failed to make a difference.
I gave up and download the 30 day trial of AppCode from Jet Brains. Autocomplete worked fine there and this maybe coincidence but it then started working again in my project in Xcode. Can't guarantee that it'll keep working...

- 1,158
- 1
- 11
- 24
-
"other suggested voodoo" lol - so well put... we loose so much time finding work arounds for apple's bugs, but I stopped complaining about xcode when I started using Android studio – JohnV Jun 21 '18 at 10:55
It seems to be file specific in my case (Xcode 9.2) For me the fix was:
- Delete problem file (remove reference)
- Clean and Build
- Add file back into the project (I did not check test targets)
- Build again
Finally after 3 hours of trying everything - autocomplete works as it should.

- 3,591
- 1
- 33
- 31
Problems mostly because there are missing location of some files in project navigator (build errors)
- Press command+1 to open
Project Navigator
pane - Check if there are any missing files
Or you can:
- Delete DerivedData (command+shift+K)
- Clean build folder (command+shift+option+K)
- Press build again (command+B)
- You should see build error that Xcode could not find some files that prevent build tool to process auto complete.
- Correct and fix any missing files that you see.
Hope this helps

- 816
- 1
- 13
- 27
Use Command + B
or Command + R
to Build or Run the project
Xcode sometimes messes up ;)

- 4,532
- 4
- 35
- 35
Xcode 11.3, macOS catalina
process parsecd achieve 100% of cpu, so kill it helps me

- 99
- 1
- 7
goto underneath directory and delete all folders on it.
{Your User}/Library/Developer/Xcode/DeriveData
It worked for me.

- 4,698
- 1
- 33
- 54
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.

- 1,232
- 12
- 23
For me, the problem occured when I discarded all the changes of one file (under Source Control > Commit), which effectively deleted the file. This is what I wanted and I thought that the file and all references to it would be delted too.
However, there was still a reference to the file (shown in red) in the Project navigator. Deleting the (now non-existant) file in the Project navigator magically brought auto-completion back.
No amount of cleaning, deleting derived data, etc helped. I only realized the deleted file was still showing when I tried to build my project, which of course failed because it couldnt find that file.
Hope this will help someone save 30 minutes :)

- 981
- 2
- 8
- 18
My case might appear too specific to help, but it might give someone an idea of how to solve broken auto-completion. Xcode 10.2.1.
In my case, auto-complete stopped working entirely and non of these other answers helped me. In addition, the fan on the computer could be heard to go louder indicating something was overworking (no other apps running), it should be noted I was editing on a MacBook Pro laptop. It seemed to be linked with the editor struggling to parse the equation I'd written:
switch mtype {
case .indeterminate:
newPosition.x = (frame.width - mainFigureText.frame.width) / 2
case .right:
newPosition.x = (((frame.width / 2) - mainFigureText.frame.width) / 2) + (frame.width / 2)
case .left:
newPosition.x = (((frame.width / 2) - mainFigureText.frame.width) / 2)
}
I was looking to animate a text view left, right, or to the middle depending on user prefs. The newPosition
is a CGPoint
that the text will animate to. Anyway, I split the equations up and all of a sudden auto-complete started working and the fan went quiet! I've been able to recreate this specific problem more than once by re-typing the above code and then replacing it with:
let halfFrameWidth: CGFloat = frame.width / 2
let middleLeft = (halfFrameWidth - mainFigureText.frame.width) / 2
switch doseType {
case .right:
newPosition.x = middleLeft + halfFrameWidth
case .left:
newPosition.x = middleLeft
default:
newPosition.x = (frame.width - mainFigureText.frame.width) / 2
}

- 1,770
- 1
- 17
- 42
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.

- 1,278
- 13
- 18
I faced the same problem in Xcode 11.3.1. In my case The issue was cause due to duplicate file names / Deleted file name. Better to run the application once and check whether there are any deleted files/classes so that you will get a syntax error.

- 9,289
- 12
- 69
- 108

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

- 5,271
- 5
- 34
- 62
Build errors can break the autocompletion feature in Xcode.

- 3,527
- 2
- 29
- 55

- 8,936
- 7
- 53
- 93
I had the issue with 100% not working auto-complete, none of written here helped. One thing I noticed – it was broken right after adding some entities into .xcdatamodel file, which have codegen class definition by default.
So I wasn't surprised when using old-style codegen none (and generating classes of course) fixed the issue immediately, even without restarting the xcode.

- 4,598
- 2
- 36
- 36
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

- 8,259
- 1
- 54
- 67
If you have issue with weird completion/auto-completion/intellisense (not showing default stuff like delegates and datasource protocols methods) just change your target (e.g. from simulator iPhone 8 to real device), build the project and switch back to your original target.
Similar with issues with Interface Builder (storyboards) not showing anything, but only "nothing selected" whenever you select any part of the view. Just switch to other Xib/Storyboard (or even create new), check if it works there and switch back.
These workarounds worked for me in both cases (had both issues in one day with one project on Xcode 10.2.1). From what I've seen all over internet forums it seems these are bugs never fixed since Xcode 6.x or so.
Cheers!

- 350
- 3
- 8
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.

- 2,256
- 3
- 16
- 30
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.

- 485
- 6
- 10
with swiftUI try to extract your subViews, otherwise the autocomplete will not work.
If you have a lot of not extracted subviews, the autocomplete will stop working

- 21
- 2
In the right "File Inspector," try toggling on an off the "Target Memberships." If you are creating a multiplatform project, try toggling (macOS).
Autocomplete should work immediately without restart.

- 1,355
- 15
- 25
The only time auto-complete doesn’t work is when the source code type for the file is not set to Objective-C or when you’re writing in another language (even if only a little snippet of, say, C).
It also doesn’t work if there is a syntax error on or above the line you are editing. A missing curly brace at the end of a method call—even if it’s not in the file you’re editing–will prevent auto-complete from obtaining the necessary context to suggest relevant commands. So will a missing file (shown in red in your list of files), even if that’s not the file you’re working on.
When it does that, attempt a build to locate errors, and then fix them.

- 170,088
- 45
- 397
- 571

- 1,485
- 14
- 19
This works for me:
Save a backup of all the project file somewhere.
Delete the project.
Create a new project and add all the files.
And it automagically works.