SDWebImage/UIImageView+WebCache.h file not found

Lizard picture Lizard · Jun 14, 2012 · Viewed 23.6k times · Source

I'm trying to use SDWebImage in my iPhone app. I followed the step by step tutorial to install SDWebImage into my Xcode project.

When I try to build my app i'm getting the following error:

Lexical or Preprocessor Issue
'SDWebImage/UIImageView+WebCache.h' file not found 

Can somebody help me solve this issue?

Answer

AmitP picture AmitP · Oct 22, 2012

A much cleaner "install" of SDWebImage would be as follow:

  1. Drag SDWebImage folder from Finder into your Xcode's project
  2. On any .m file where you wish to use it add: #import "UIImageView+WebCache.h"

    (and any other SD component needed)

    instead of what you probably did: #import <SDWebImage/UIImageView+WebCache.h>

this does not require any project header manipulation and will work as is.