user5385949
user5385949

Reputation: 53

Xcode No such Module

I am trying to use the cocoapod Alamofire in Swift. However, I get the error "No Such Module" when I Import Alamofire I am using Xcode 7.2 Alamofire 3.0 and Swift 2 The following are the steps I took

1) In terminal I ran

$ sudo gem install cocoapods

There were no errors then

2) I ran

cd ~/Path/To/Folder/Containing/Project (once in the project folder I ran)

pod init

3) Then

open -a Xcode Podfile

4) Then I added

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

pod 'Alamofire', '~> 3.0' 

to the Podfile

5) Then I ran

pod 'Alamofire', '3.0'

followed by

pod install

I added $(SRCROOT) to runpath and buildpath.

Also I found this answer No such module "Armchair" saying to add the pre-release but I don't really understand how to do this or if this is my problem. Maybe this is obvious ,however I'm new to Swift and am not understanding. Also should Alamofire show up in my frameworks, or pods folder? It isn't in either. files in project

Upvotes: 5

Views: 4769

Answers (1)

Haroldo Gondim
Haroldo Gondim

Reputation: 7993

After pod init you must use the new <YourProject>.xcworkspace instead of <YourProject>.xcodeproj.

The xcworkspace contains your project and your pods after pod install.

Upvotes: 11

Related Questions