5
votes

I installed SDWebImage using CocoaPods.

My podfile was as it is written in the https://github.com/rs/SDWebImage

platform :ios, '8.0'
use_frameworks!
pod 'SDWebImage', '~>3.7'

when I import SDWebImage it says

No such module 'SDWebImage'

my Xcode version is: Version 7.2.1

5
Are you opening your Project or the Workspace? The workspace will include the SDWebImage pod. You need to build the workspace for this to work. - stevekohls
Thanks, I didn't build. it seems it is working now. - tmac99
Hi @tmac99 I have did the same thing, but it showing linker error while try to run workspace. Have you faced it? - Satish

5 Answers

8
votes

Use the new <YourProject>.xcworkspace instead of <YourProject>.xcodeproj.

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

2
votes

Just build your project before and after importing any new pods in your code

1
votes

Add -ObjC in Other Linker Flags.

enter image description here

0
votes

you can add this to podfile like

platform :ios, '8.0'
# Uncomment the next line when you want all Pods as static framework
# use_modular_headers!
pod 'SDWebImage', :modular_headers => true

or

platform :ios, '8.0'
use_frameworks!
pod 'SDWebImage'
0
votes

For me worked uncommenting this line in podfile:

#use_frameworks! -> use_frameworks!