5

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

Haroldo Gondim
  • 7,725
  • 9
  • 43
  • 62
tmac99
  • 153
  • 2
  • 10
  • 1
    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 Mar 09 '16 at 18:45
  • Thanks, I didn't build. it seems it is working now. – tmac99 Mar 09 '16 at 18:47
  • Hi @tmac99 I have did the same thing, but it showing linker error while try to run workspace. Have you faced it? – Satish Mar 21 '16 at 05:34

5 Answers5

8

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

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

Haroldo Gondim
  • 7,725
  • 9
  • 43
  • 62
2

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

Mohammed Riyadh
  • 883
  • 3
  • 11
  • 34
1

Add -ObjC in Other Linker Flags.

enter image description here

Payal Maniyar
  • 4,293
  • 3
  • 25
  • 51
0

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

For me worked uncommenting this line in podfile:

#use_frameworks! -> use_frameworks!

Vadim
  • 3,855
  • 2
  • 17
  • 22