C++ Code Completion Doesn't Work

I have a project with both C++ and ObjC code in Xcode 10 and the C++ code completion doesn't work anymore at all. I get the "No Completions" popup message when there should be suggestions.


This is specific to C++ and Xcode 10 as I can open the same project in Xcode 9 and the code completion works as expected and the ObjC part of the project works too in Xcode 10.


I've tried rebuilds, deleting ~/Library/DerivedData folder, unchecking and checking in Preferences | Text Editor | Code Completion (with accompanied restarts of Xcode) and nothing works.


Ideas of Xcode 10 bug?

Accepted Reply

I filed a bug with Apple and actually got a fix. Problem seems to be their New Build System introduced in Xcode 10. If you set it back to Legacy Build System in File | Project Settings, close your project and reopen it, then it works for me.


I'm not aware of what consequences this might have, but I suspect performance is the reason for the new build system.

Replies

I posted a similar issue with headers not being suggested or autocompleted in C++ with Xcode 10. I'm glad I'm not the only one with issues. Can any others confirm or let us know if there have been bug reports?

I came up with the same problem, and tried to reinstall XCode for serveral times. Is there a way to fix it?

I filed a bug with Apple and actually got a fix. Problem seems to be their New Build System introduced in Xcode 10. If you set it back to Legacy Build System in File | Project Settings, close your project and reopen it, then it works for me.


I'm not aware of what consequences this might have, but I suspect performance is the reason for the new build system.