I recently ran into this problem with a big objc project. Hope this helps someone.
For me, autocomplete worked before in this project, but then a crash for all object c-classes / methods started. However, the project is still drafted without problems.
I ended up commenting on all existing import data in the bridge header and adding a simple test class for which automatic processing worked. Then uncomment each of the other imports until I highlighted which one caused the problem.
For example, my headline basically looked like this:
#import "MyClass.h" #import "MyOtherClass.h" #import "SomeThirdPartyModule.h" etc...
I have done this:
#import "SimpleTestClassWithOneMethod.h" // #import "MyClass.h" // #import "MyOtherClass.h" // #import "SomeThirdPartyModule.h"
And autocomplete started working for SimpleTestClass when used from Swift.
Then he began to uncomment the other classes from the bridge header until it worked. The import that caused this problem was a third-party structure, not sure why this caused the problem, but I just pulled what I needed from this specific header for my quick code and imported it separately.
source share