I have noticed this problem as closed before but I am getting the same problem.
P.S - I have imported Alamofire in the class mentioned in the screenshot
Here is my pod details
platform :ios, '10.0'
use_frameworks!
target 'PhotoTagger' do
pod 'Alamofire'
end
Also the only thing being auto completed is AlamofireVersionNumber and i cannot access anything when I am trying to use the auto complete feature. Now if i write Alamofire by hand then I can access some methods, but then again something is going wrong and code is not compiling, which i think boils down to the issue that the class isnt being fetched by auto complete.
I have tried -
In Project settings > Build settings
All other pods are working fine, except Alamofire. Also after writing class name by hand or copy pasting, some of the methods that are being auto completed does not have the same signature of the actual method of the Alamofire class
Please please please !! help me sort this out, so that someone out there when facing this can help themselves too. There isnt any solution to this as of now.
I had opened an issue on Alamofire
's Github page, but they responded with
Sorry, we're not responsible for Xcode's autocomplete issues.
In the future, you should open questions like this on Stack Overflow
and tag alamofire.
Cheers. 🍻
Please help, I am stuck with this for quite some time.
Here is my project settings details Also, I have build the project and still the problem persists.
P.S - Writing the class manually by hand , and the methods even, it compiles but everytime, I have to go to the github page, to copy paste the method signature, The problem is that with Autocomplete, i can navigate all method signatures and know about the public available methods. But I am only restricted to the example methods available in github, as everytime I have to copy paste the methods and the overwrite the implementation. Again, this compiles and runs, but the auto complete is not working, not for the class, or for the functions.
Probably this is not about Alamofire or pod libraries but Swift and XCode. This answer could be your solution, shortly:
Or you can try this answer if your XCode have some cache file issue, shortly close XCode and remove file below:
~/Library/Caches/com.apple.dt.Xcode
and try again.
Or you can try this answer, shortly:
Find any commented out (/* abc */) code after @end in your files and delete.
Let me know if any solution it works.
I had the same problem once. I can’t remember exactly what worked, but we will figure that out now.
In «Build Settings -> Search path -> Framework Search Paths»
check to see if you have the following:
Always Search user Paths : NO
Framework Search Paths: $(inherited), "$PODS_CONFIGURATION_BUILD_DIR/Alamofire", "${PODS_ROOT}/Alamofire/"
These search path might not be the same as yours, so just double check that the path above is correct, according to where the files are saved.
Before you do changes in the config files, take a backup in case something get's messed up.
When you do changes, build your project and restart Xcode.
I just did a test project with Alamofire:
Installing pod: pod 'Alamofire', '~> 4.4'
Opening xcworkspace first time: Autocompletion doesn't work. Xcode doesn't recognize import Alamofire.
Then:
Build project: Project -> Build
Xcode recognizes import Alamofire.
When typing Alamofire it doesn't work, only AlamofireVersionNumber is autocompleted.
But when typing Alamofire.(and typing a known command from alamofire it will autocomplete)
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