"No such module 'Alamofire'" won't recognize framework
I am trying to add Alamofire to a new XCode project with Swift. I feel like I have tried everything.
Every time I try to add
import Alamofire
I get "No such module".
I have tried installing it as stated on https://github.com/Alamofire/Alamofire, I tried doing it manually first, then Carthage and Cocoapods, but with the same result.
I have tried deleting the DerivedData folder and rebuilding the project without any luck.
It is a completely clean install, yet it just won't recognize the framework. I have tried the suggestions in the first 10 Google searches and here on Stackoverflow (Cannot install Alamofire in new Xcode Project. "No Such module Alamofire") Here are some screenshots from my latest manual attemp:
Looks like you are using the module by directly dropping the source files into your project.
If that's the case, you don't have to use import Alamofire
header or use Alamofire( dot )
in the beginning of every method.
Just use the code as below omitting Alamofire
tag.
request(.GET, "https://httpbin.org/get")
I know it's late answer, but I was facing same problem with Xcode 8 Swift 3.0. I follow this Alamofire link and added framework manually. Its working fine. One of my project stuck on 'no such module' error, I cleaned derived data (Cleaning derived data removed source files of Alamofire. I added it again in my project ;) ) and it works like charm :).
Followed instructions
I was able to resolve this issue changing my Podfile. I originally had the reference to Alamofire in a target:
The problem disappeared when I changed the podfile to the following:
platform :ios, '8.0'
use_frameworks!
pod 'Alamofire', '~> 3.0'
pod 'SwiftyJSON', :git => 'https://github.com/SwiftyJSON/SwiftyJSON.git'
target 'xxxxxxx' do
pod 'GoogleMaps'
end
target 'xxxxxxxTests' do
pod 'GoogleMaps'
end
链接地址: http://www.djcxy.com/p/26482.html