I've been trying to install 2 Swift pods using Cocoapods version 0.39.0 and Xcode Version 7.1 (7B91b). The pods are Alamofire and SwiftyJSON. Here's what my podfile looks like:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target 'MyAppName' do
pod 'Alamofire', '~> 3.0'
pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'
end
Terminal shows that the pods are installed, but the import statements do not autocomplete when trying to import these into other Swift files. No big deal, I can type them out manually and the project will build just fine.
The problem is I have no code completion. I can copy/paste code examples for these pods and they will build just fine, but there is no code completion and even if I do type out methods manually I still got stuck on things like closure types because they won't autocomplete correctly and i have no idea what parameters they want.
The only thing that will ever auto complete for me are these variables: AlamofireVersionNumber or SwiftyJSONVersionNumber
I'm not sure why I'm experiencing this seeing as how I've followed the podfile instructions from the readme's of these libraries.
Auto-completion should normally work once you have build the libraries for the first time. Is that the case for you as well?
Hi @neonichu, unfortunately that is not the case for me. They will build just fine, but the code completion is not working. My guess is that it's the new Xcode version 7.1. I just confirmed with a friend that he is having the same problem as well. He tested on both 7.1 GM and 7.1 beta.
Having the same issues on 7.1.1 with GCDAsyncSocket
This should now be fixed on master, right @neonichu ?
@segiddins Possibly, IDK if this is the same issue
@neonichu This is no longer a problem for me, not really sure what changed.
Awesome :)
I've exactly the same issue and no idea how to fix it, running 0.39.0.
Xcode 7.2 still not working
I have the same issue, tried it both with 0.39.0 and 1.0.0.beta.3. Xcode version is 7.2.
Same here.
I have the same problem.
✚1️⃣
instead of +1ing can you provide working examples, deeper insight or code please. Remember, project is work done on people's spare time.
You are right.
Well, I installed Nimble this way (here is my Podfile):
(BTW, CocoaPods 0.39.0, Xcode 7.2.1)
platform :ios, '9.0'
use_frameworks!
inhibit_all_warnings!
xcodeproj 'MyProjectName'
pod 'Alamofire', '~> 3.1.2'
pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'
pod 'IHKeyboardAvoiding'
pod 'Watchdog'
pod 'Fabric'
pod 'Crashlytics'
# Testing pods
def testing_pods
pod 'Nimble', '~> 3.0.0'
pod 'OHHTTPStubs'
end
target 'MyTestsProject' do
testing_pods
end
Everything works fine (project compiles, run, etc).
The autocomplete works for Pods outside of the Tests project.
The autocomplete does NOT work for Pods inside the Test project (e.g.: Nimble APIs).
If I can somehow get more info, please let me know.
Thanks.
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.

BTW, it would seem you need to include the quotation marks when inputting "$(inherited)". Wasted a few hours trying to get this working...
If anyone comes across this and like me spent hours searching and trying everything in forums similar to this and nothing seemed to work. Please go to your AppDelegate, in your xcode right hand side panel (Utilities) in "Target Membership", untick all UITests and Tests targets, do a clean and a build. Completion should start working now for your pods if you had the same problem as me. I accidentally along the way of creating a new target project in the same workspace, added target membership of some files to UITests that were not linked to my pods and stopped completion from happening.
Nope, it not working
Try removing the following line in your Podfile, then pod install again:
use_frameworks!
Most helpful comment
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.