16

Ever since Xcode 7.3 the autocompletion or code completion doesn't work properly.

Simple import class and it can't autocomplete

I have tried:

  • Deleting Derived Data folder
  • Clean Targets and Build
  • Reinstalling Xcode

It does autocomplete after you type it out fully the first time. But if you haven't referenced it once (i.e. like enums) it only shows what you typed out before (not showing full list of enums). Pressing escape doesn't help either.

Any other suggestions? Or anyone else experiencing the same?

mashdup
  • 875
  • 7
  • 18

5 Answers5

15

Without doing anything, In Build-Settings -> Deployment changing iOS Deployment target from 8.0 to 8.1 resolved the issue for me.

enter image description here

It also works for XCode 6 as mentioned here

Also works on Xcode 8, Simply change the deployment target from iOS 9.0 to iOS 9.1.

Community
  • 1
  • 1
Tunceren
  • 754
  • 1
  • 8
  • 16
1

Xcode 8 has now fixed this very annoying autocomplete issue. So anyone who is still having this problem, update to Xcode 8.

Edit: Please note, this has not solved for others. So your milage may vary. For me, it has fixed without doing anything extra. But they are using their new 'intelligent' autocomplete. Thinking about it, it could be part of the indexing. Deleting the DerivedData folder could help.

mashdup
  • 875
  • 7
  • 18
  • 8
    Not so fast... I've never had autocomplete problems, then it breaks for me when I update to Xcode 8.0. Hence, I found this thread. – Rob Johnston Sep 21 '16 at 17:57
  • Seems like I should revisit. I have taken off accepted answer. I cleared the cache and any derived data, if that helps. It seems to be going fine now – mashdup Sep 27 '16 at 08:10
  • I didn't have this problem before, then today with Xcode 8.1 I can't autocomplete! – auspicious99 Nov 13 '16 at 15:51
  • saw this last time in Xcode 4 or 5, but occurs again after upgrading to Xcode 8.1 – reTs Dec 25 '16 at 03:47
0

Perhaps, this answer is too late, I'll share it anyway.

First of all, I've uninstalled Alcatraz and all plugins.

Second, I've followed ElonChan's instructions explained on:

Xcode 7.3 autocomplete issues

As a result, autocompletion automagically got back! Thanks @ElonChan.

I hope this answer also solves your problem.

Luiz Durães
  • 744
  • 9
  • 17
0

This Happen usually when you are using core Data in your project.(because of automatic indexing of files by xcode not been done) The simple way to avoid this thing is that just click to your project name and clean project come back the same file where you wanna see suggestions type any word and thats it.

MRizwan33
  • 2,723
  • 6
  • 31
  • 42
0

There is a way to set shortcut keys for code completion. Xcode -> Preferences -> Key Bindings -> find Show Completions and set whatever non-duplicate keys you want.

enter image description here

Lawliet
  • 3,438
  • 2
  • 17
  • 28