I have an demo app that uses various internal development pods written in swift. All of the swift code in the development pods has trouble code completing. For example, when holding command and clicking on import UIKit
, Xcode complains of a Symbol Not Found
when tapping on UIKit
. There's no compiler errors, everything builds and runs just fine.
If I have swift code outside of the pod in the demo project itself, that code completes just fine, but when I put it in a pod and run pod install
, it either stops code completing immediately, or works for a few hours / pod update
commands, and then randomly stops working. I have other development pods in my project, and those written in Objective-C have no trouble code completing ever.
I have tried multiple different solutions, namely the solutions listed here: Xcode 6 Swift code completion not working. None of these worked for me.
I tried various combinations of these solutions from the post above multiple times:
pod deintegrate
and then pod install
None of which seem to work.
Any help would be greatly appreciated!
This was also driving me crazy for a few hours, everything seemed fine, but the auto complete wasn't just working.
In my case I was using RestKit 0.25 with CocoaPods 0.39.0 on Xcode 7.2.1 (Since im still on Yosemite)
Since everything was compiling fine, I tried to find where the autocomplete feature kicks in, and I realised that there was something weird at the Project Build Settings level.
Of course it will compile and build fine if the Build Settings of your Target are correct, but what about the project one?
Just select YourProject->(PROJECT)YourProject->Build Settings-> Header Search Paths, and removed everything but "$(inherited)" non-recursive. Finally clean your project and autocomplete will be working again.
For me adding anything to the Build Settings didn't work, but deleting Derived Data and building the Pod scheme explicitely did the trick.
Go to "Manage Schemes" and check the Pods-MyProject scheme. Select this scheme (button next to the run and stop button) and Build for Running shift + cmd + R
Switch back to your project scheme afterwards.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With