Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode do not suggestion (autocomplete) code

I have swift project in XCode 6. Something happened to my project that make my suggestion (autocomplete) doesn't work.

  1. It's problem with my current project. Other projects works good.
  2. I've tried to delete Derived Data.
  3. Reinstall XCode
  4. Deleted .workspace in project
  5. Tried "Header path".

I searching answer and nothing of it do not work.

One more: after delete of derived data when Xcode RE-indexing autocomplete is WORK. But when it finished autocomplete do not work again. It's something with workspace?

like image 239
Flashded Avatar asked Aug 21 '14 14:08

Flashded


2 Answers

  1. Clear derived data.
  2. Under build settings, select Always Search User Paths to "YES".
  3. Clean the project.
like image 83
Gautam Jain Avatar answered Nov 03 '22 22:11

Gautam Jain


When troubleshooting this and reading other SO articles, I ended up setting the Defines Module build setting to true. This stopped all autocompletion in my swift files.

The solution for me was to set the Defines Module build setting to false

Hope this helps you!

like image 1
Troy Avatar answered Nov 03 '22 23:11

Troy