“No such module. Alamofir does not recognize the framework

I am trying to add Alamofire to a new Xcode project using Swift. I feel like I've tried everything.

Every time I try to add

import alamofire

I get "No such module."

I tried to install it, as indicated at https://github.com/Alamofire/Alamofire.First I tried to do it manually, then Carthage and Cocoapods, but with the same result.

I tried to delete the DerivedData folder and restore the project without any luck.

This is a completely clean installation, but it just does not recognize the framework. I tried the suggestions in the first 10 Google search engines and here in Stackoverflow ( Failed to install Alamofire in the new Xcode project. “There is no such Alamofire module” ) Here are some screenshots from my last guide:

General tap

Dependencies

+7
ios xcode swift alamofire
source share
3 answers

It looks like you are using the module by simply dropping the source files into your project.

If in this case you do not need to use the import Alamofire header or use Alamofire( dot ) at the beginning of each method.

Just use the code as shown below without the Alamofire tag.

 request(.GET, "https://httpbin.org/get") 
+4
source share

I know this is a late answer, but I ran into the same issue with Xcode 8 Swift 3.0. I follow this link Alamofire and added the framework manually. His work is wonderful. One of my projects was stuck in the error “there is no such module”, I cleared the derived data (cleaning the received data deleted the Alamofire source files. I added it again to my project;)) and it works like a charm :).

Follow instructions

  • Download Alamofire
  • Drag the Alamofire project into the project directory
  • Verify an alamofire deployment target similar to your project
  • Go to the general settings of your project, click the + button in the "Embedded binaries" section.
  • You will see two different Alamofire.xcodeproj folders, each of which has two different versions of Alamofire.framework, subfolded in the Products folder. It doesn't matter which product folder you choose, but it matters whether you select the top or bottom version of Alamofire.framework.
  • Select the top version of Alamofire.framework for iOS and the bottom for OS X.
  • And this! Alamofire.framework is automatically added as the target dependency, related structure and built-in infrastructure at the stage of building copy files, which are all you need to create on the simulator and device.
0
source share

I managed to solve this problem by changing my subfile. I initially had a link to Alamofire in purpose:

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 
-one
source share

All Articles