Alamofire: Xcode 8 (beta 3), Swift 3.0 + Cocoapods - No such module

Created on 25 Jul 2016  路  13Comments  路  Source: Alamofire/Alamofire

Setup

  • Fresh, brand new Xcode 8 (beta 3) project (iMessage extension).
  • Added the swift3 branch to my Podfile:
   source 'https://github.com/CocoaPods/Specs.git'
   platform :ios, '10.0'
   use_frameworks!

   target 'downlow' do

    pod 'Alamofire',
     :git => 'https://github.com/Alamofire/Alamofire.git',
     :branch => 'swift3'
   end
  • Ran sudo gem install cocoapods --pre
  • Install worked fine, and project compiles via workspace file
  • Import:

import AlamoFire

I get the age old issue: "No such module: Alamofire".

What the heck am I missing? I don't remember this being a problem in past projects.

screen shot 2016-07-24 at 7 42 17 pm

Note: I've done clean, re-open Xcode, clean more, re-compile etc. I've added the Alamofire framework to Linked Frameworks and Build phases (although I don't ever remember having to do this before) and it's still not compiling.

Most helpful comment

So this might be completely wrong, but have you tried Cmd+B to build it first. That usually fixes that error for me.

All 13 comments

So this might be completely wrong, but have you tried Cmd+B to build it first. That usually fixes that error for me.

I've tried to build the project, yes.

Could it be the fact that it's an extension?

Like I said, I've even manually added the framework to Linked Frameworks and Build Phases.

screen shot 2016-07-25 at 9 48 46 am
screen shot 2016-07-25 at 9 48 37 am

I wasn't including my extension as a target in my Podfile (see below). Closing as fixed.

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

target 'MyApp' do

 target 'MyExtension' do

  pod 'Alamofire',
   :git => 'https://github.com/Alamofire/Alamofire.git',
   :branch => 'swift3'

 end

end

Thank you !

thank you

So no one had a solution for this bug issue...?

I am also facing the same issue.plz help...

@terryworona i have the same problem I tried your method but didn't succeed what to do next?

Build project once

Otherwise make sure you have the most updated version of xcode

I still have this issue and I have ended my programming life due to it.

Never mind I solved it. most times it will be a problem with your pod file. As of August 2018, the podfile will be

`source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

target '' do
pod 'Alamofire', '~> 4.7'
end`

LOL to my above comment.

Was this page helpful?
0 / 5 - 0 ratings