Installation with CocoaPods
platform :ios, '6.1' pod 'SDWebImage', '~>3.7'
If you are using Swift, be sure to add
use_frameworks! and set your target to iOS 8+:
platform :ios, '8.0' use_frameworks!
There are 3 subspecs available now:
means you can install only some of the SDWebImage modules. By default, you get just
Core, so if you need
you need to specify it).
Carthage is a lightweight dependency manager for Swift and Objective-C. It leverages CocoaTouch modules and is less invasive than CocoaPods.
To install with carthage, follow the instruction on Carthage
If you installed using CocoaPods:
If you installed manually:
In order to gain access to all the files from the repository, you should clone it.
git clone --recursive https://github.com/rs/SDWebImage.git
- 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
- 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:
Open the "Build Settings" tab, in the "Linking" section, locate the "Other Linker Flags" setting and add the "-ObjC" flag:
Alternatively, if this causes compilation problems with frameworks that extend optional libraries, such as Parse, RestKit or opencv2, instead of the -ObjC flag use:
If you're using Cocoa Pods and have any frameworks that extend optional libraries, such as Parsen RestKit or opencv2, instead of the -ObjC flag use:
In the source files where you need to use the library, import the header file:
At this point your workspace should build without error. If you are having problem, post to the Issue and the community can help you solve it.