0
votes

I've started a new iOS project in Xcode and have tried installing some common swift packages like SwiftyJSON and Alamofire through cocoapods. The pods install successfully and the full libraries show up under the root project directory, but whenever I attempt to import them into my project Xcode returns a "No such module.." error.

enter image description here

What I've already done: - I've cleaned and rebuilt the project - I've ensured that I'm using the .xcworkspace file after installing the cocoapods - I've rebooted my mac and xcode - I've tried linking the binaries in the "build phases" tab in the project settings - I've tried building the project once before installing pods

All to no avail. Here are the versions I'm using: - El Capitan 10.11.2 - Xcode 7.2 - Cocoapods 0.39.0

Any and all help/suggestions towards what I may be doing wrong are greatly appreciated!

--EDIT (adding podfile)--

platform :ios, '8.0'
use_frameworks!

target 'newApp' do
   pod 'Alamofire'
   pod 'SwiftyJSON'
end
2
@AnkitGoel podfile added - IndianAg0711

2 Answers

0
votes

Try using the following as your podfile. After changing the podfile dont forget to run pod install.

platform :ios, '8.0'
use_frameworks!

pod 'Alamofire'
pod 'SwiftyJSON'
0
votes

You can add Alomofire: Project -> Target -> General -> Embedded Libraries -> + -> Alamofire. As you see in picture: enter image description here