SDWebImage v5.0.0-beta Release Notes
Release Date: 2018-07-17 // almost 6 years ago-
๐ See all tickets marked for the 5.0.0 release
Infrastructure
- the new requirements are iOS 8.0+ and macOS 10.10+ #2147
- Xcode 9+
Backwards incompatible changes
โก๏ธ See the 5.0 Migration Guide for a list of comprehensive changes and the way to update your code
๐ Features
- ๐จ Introduce
SDAnimatedImageView
,SDAnimatedImage
and refactor the way we handle animated images #2140 - โ Added APNG support via dedicated coder
SDImageAPNGCoder
#2149 - ๐จ Refactored
SDWebImageDownloader
configs, separated them into a dedicatedSDWebImageDownloaderConfig
object #2263 - ๐จ Refactored the way we work with the scale factor #2266
- Created request and response modifier #2261
- ๐จ Refactor Cache Path API #2276
- ๐จ Refactor custom cache serializer & headers filter for request level #2280
- ๐จ Refactor cache - Support custom memory cache & disk cache #2282
- ๐จ Refactor cache - Support custom web cache #2278
- ๐จ Refactor - custom image loader - Supports loader protocol #2256
๐ Use
SDWebImageAvoidDecodeImage
to allow user to control force decode feature for individual image request #2283๐
SDImageCache
supports disk cache writing options. SeeSDImageCacheConfig diskCacheWritingOptions
#2148SDImageCache
now usesNSData writeToFile:options:error
instead ofNSFileManager createFileAtPath:contents:attributes
#2148๐ Moved
SDImageCache maxMemoryCost
andSDImageCache maxMemoryCountLimit
toSDImageCacheConfig
#2151โ Added
SDImageCache diskImageDataExistsWithKey:
synchronous method #2151Moved
UIImage sd_imageLoopCount
andUIImage isGIF
(and renamed tosd_isAnimated
) toUIImage+Metadata
category, removed the outdated methods #2152๐ Move context and other type definitions to a separate header (
SDWebImageDefine
) to allow to be included without dependency #2188Pass
context
arg from the top level APIs to the bottom level APIs to allow specify logic in the future #2189 d6a3e2c c24c3d3๐จ Refactor the image indicator by creating
SDWebImageIndicator
andSDWebImageProgressIndicator
protocols and two concrete classes that implement activity and progress indicators for both UIKit and AppKit #2185 46b62cf๐จ Refactor the implementation of
SDWebImagePrefetcher
so it behaves more like a "shared instance" object, similar to other platform classes. Each instance will manage its own list of urls. #2191 1efc247 92f3d2c bc164d6๐จ Refactored and enhanced the way we allow image transformations. Switched from a single delegate method to composition of
SDImageTransformer
#2219๐ API style refactoring - #2250
- Use property instead of setters and getters to make the property available in Swift
- Use class property with the correct name instead of
+(instanceType)sharedInstance
in singleton to make it more easy to use in Swift. The generated interface should be simpleopen class var shared { get }
- Add all nullability annotation to avoid any
AnyObject!
implicitly unwrapped optionals (Except thatnull_resettable
) - Add all Core Foundation Ownership using
CF_RETURNS_RETAINED
for Get Rule andCF_RETURNS_NOT_RETAINED
for Create Rule to avoid anyUnmanaged
CF value - Change all key for Dictionary with
NS_STRING_ENUM
to make it easy to use in Swift with dot syntax - Change all global value type which represent enum with
NS_TYPED_ENUM
to make it easy to use in Swift with dot syntax
โ Remove the extra calculation of image orientation for ImageIO coder & Fix macOS image orientation #2271
Added
SDWebImageError
(defined asNS_ERROR_ENUM
) to group all our errors together #2290โ Added tests for macOS
โ Add the
SDWebImageContextStoreCacheType
context option to specify target cache type when the image is downloaded by manager and will store to cache #2360๐ Feature watchOS
WKInterfaceImage
withsd_setImageWithURL
#2331โ Add options to specify query cache sync/async behavior #2312
๐ Fixes
SDWebImageManager loadImageWithURL:options:progress:completed:
changed thecompleted
param requirement fromnullable
tononnull
#2164