Alamofire: Xcode 8, Swift 3.0 + Cocoapods - No such module

Created on 24 Oct 2016  ·  2Comments  ·  Source: Alamofire/Alamofire

Setup

Fresh, brand new Xcode 8 project.
Added Alamofire to my Podfile:

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

target ‘weatherkaka’ do
    pod 'Alamofire', '~> 4.0'
end

Ran the command $ pod install
Install worked fine, and project compiles via workspace file
Import: import AlamoFire

I get the issue: "No such module: Alamofire". What's missing?

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

screen shot 2016-10-23 at 9 14 40 pm

support

Most helpful comment

That's incorrect, that file is only necessary for projects publishing podspecs with Swift 3 code. For pod consumers, CocoaPods uses the Swift version defined in your project to set it for the Pods project.

@nikkibeats Makes sure you're using the *.xcworkspace file created by CocoaPods and not your *.xcodeproj.

If that doesn't work, I'm sorry but we use our GitHub project for bug reports and feature requests. In the future, you should open questions like this on Stack Overflow and tag alamofire.

Cheers. 🍻


From our Contribution Guidelines

Asking Questions

We don't use GitHub as a support forum. For any usage questions that are not specific to the project itself, please ask on Stack Overflow instead. By doing so, you'll be more likely to quickly solve your problem, and you'll allow anyone else with the same question to find the answer. This also allows maintainers to focus on improving the project for others.

All 2 comments

You need to add .swift-version file with 3.0

Run the following command in your terminal

cd YourProject
echo 3.0 > .swift-version

That's incorrect, that file is only necessary for projects publishing podspecs with Swift 3 code. For pod consumers, CocoaPods uses the Swift version defined in your project to set it for the Pods project.

@nikkibeats Makes sure you're using the *.xcworkspace file created by CocoaPods and not your *.xcodeproj.

If that doesn't work, I'm sorry but we use our GitHub project for bug reports and feature requests. In the future, you should open questions like this on Stack Overflow and tag alamofire.

Cheers. 🍻


From our Contribution Guidelines

Asking Questions

We don't use GitHub as a support forum. For any usage questions that are not specific to the project itself, please ask on Stack Overflow instead. By doing so, you'll be more likely to quickly solve your problem, and you'll allow anyone else with the same question to find the answer. This also allows maintainers to focus on improving the project for others.

Was this page helpful?
0 / 5 - 0 ratings