Trying to install SDWebImage into my Swift project. I am using the following instructions (https://github.com/rs/SDWebImage):
- Download and unzip the last version of the framework from the download page
- Right-click on the project navigator and select "Add Files to "Your Project":
- In the dialog, select SDWebImage.framework: Check the "Copy items into destination group's folder (if needed)" checkbox
So I git clone --recursive
the project from GitHub, I drag the .xcodeproj file into my project (since there is no SDWebImage.framework file as far as I can tell, and this has always worked for other frameworks), I complete the rest of the instructions:
- In you application project app’s target settings, find the "Build Phases" section and open the "Link Binary With Libraries" block
- Click the "+" button again and select the "ImageIO.framework", this is needed by the progressive download feature: Add Linker Flag
- Open the "Build Settings" tab, in the "Linking" section, locate the "Other Linker Flags" setting and add the "-ObjC" flag
And then I add #import <SDWebImage/UIImageView+WebCache.h>
in my bridging header. I build the project and I get: "SDWebImage/UIImageView+WebCache.h" not found. I've tried some variations on these steps and nothing seems to work. What am I doing wrong?
EDIT
Pretty sure this is happening because I'm not pulling in an SDWebImage.framework file, rather the .xcodeproj file. But I've downloaded from zip and cloned the repo, and there doesn't seem to be a .framework file in there...
UPDATE
So apparently I'm just supposed to download the compiled framework, which I found in another answer: https://stackoverflow.com/a/30545367/918065. Maybe? I have no clue. When I imported the .framework file my bridging header worked and recognized #import <SDWebImage/UIImageView+WebCache.h>
, but it didn't recognize imageView.sd_...
. So still workin on it.
Last compiled framework is 3.7.0 and you can find it in: https://github.com/rs/SDWebImage/releases
For easier access, the direct link to the framework is below: https://github.com/rs/SDWebImage/releases/download/3.6/SDWebImage-3.6.framework.zip