From 153af72369dca6411a4658e22bf5bdb531437746 Mon Sep 17 00:00:00 2001 From: Bogdan Poplauschi Date: Wed, 11 Apr 2018 11:41:08 +0300 Subject: [PATCH 1/5] Set version to 5.0.0-beta, Xcode 8 required, updated the CHANGELOG and added 5.0 Migration Guide --- CHANGELOG.md | 50 +++++++ Docs/SDWebImage-5.0-Migration-guide.md | 173 +++++++++++++++++++++++++ README.md | 3 +- SDWebImage.podspec | 2 +- WebImage/Info.plist | 4 +- 5 files changed, 228 insertions(+), 4 deletions(-) create mode 100644 Docs/SDWebImage-5.0-Migration-guide.md diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ebf44af..762b2a8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,53 @@ +## [5.0.0 - Release_name_TBD, on Apr xxth, 2018](https://github.com/rs/SDWebImage/releases/tag/5.0.0-beta) +See [all tickets marked for the 5.0.0 release](https://github.com/rs/SDWebImage/milestone/15) + +#### Infrastructure +- the new requirements are **iOS 8.0+** and **macOS 10.10+** #2147 + +#### Backwards incompatible changes + +See the [5.0 Migration Guide](Docs/SDWebImage-5.0-Migration-guide.md) 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 `SDWebImageAPNGCoder` #2149 +- Refactored `SDWebImageDownloader` configs, separated them into a dedicated `SDWebImageDownloaderConfig` 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. See `SDImageCacheConfig diskCacheWritingOptions` #2148 +- `SDImageCache` now uses `NSData writeToFile:options:error` instead of `NSFileManager createFileAtPath:contents:attributes` #2148 +- Moved `SDImageCache maxMemoryCost` and `SDImageCache maxMemoryCountLimit` to `SDImageCacheConfig` #2151 +- Added `SDImageCache diskImageDataExistsWithKey:` synchronous method #2151 +- Moved `UIImage sd_imageLoopCount` and `UIImage isGIF` (and renamed to `sd_isAnimated`) to `UIImage+WebCache` category, removed the outdated methods #2152 +- Move context and other type definitions to a separate header (`SDWebImageDefine`) to allow to be included without dependency #2188 +- Pass `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` and `SDWebImageProgressIndicator` 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 `SDWebImageTransformer` #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 simple `open class var shared { get }` + - Add all nullability annotation to avoid any `AnyObject!` implicitly unwrapped optionals (Except that `null_resettable`) + - Add all Core Foundation Ownership using `CF_RETURNS_RETAINED` for + Get Rule and `CF_RETURNS_NOT_RETAINED` for Create Rule to avoid any `Unmanaged` 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 as `NS_ERROR_ENUM`) to group all our errors together #2290 +- Added tests for macOS + +#### Fixes +- `SDWebImageManager loadImageWithURL:options:progress:completed:` changed the `completed` param requirement from `nullable` to `nonnull` #2164 + +TODO: Update diagrams + ## [4.4.1 - 4.4 patch, on June 7th, 2018](https://github.com/rs/SDWebImage/releases/tag/4.4.1) See [all tickets marked for the 4.4.1 release](https://github.com/rs/SDWebImage/milestone/26) diff --git a/Docs/SDWebImage-5.0-Migration-guide.md b/Docs/SDWebImage-5.0-Migration-guide.md new file mode 100644 index 00000000..3aaf0c65 --- /dev/null +++ b/Docs/SDWebImage-5.0-Migration-guide.md @@ -0,0 +1,173 @@ +## SDWebImage 5.0 Migration Guide + +SDWebImage 5.0 is the latest major release of SDWebImage, a top library for downloading and caching images. +As a major release, following [Semantic Versioning](http://semver.org/) conventions, 5.0 introduces several API-breaking changes with its new architecture. + +.... RELEASE_SUMMARY .... + +This guide is provided in order to ease the transition of existing applications using SDWebImage 4.X to the latest APIs, as well as explain the design and structure of new and changed functionality. + +### Requirements: iOS 8, Mac OS X 10.10, watchOS 2, tvOS 9, Xcode 8 + +SDWebImage 5.0 officially supports iOS 8 and later, Mac OS X 10.10 and later, watchOS 2 and later and tvOS 9 and later. +It needs Xcode 8 or later to be able to build everything properly. + +For targeting previous versions of the SDKs, check [README - Backwards compatibility](https://github.com/rs/SDWebImage#backwards-compatibility) +. + +### Migration + +#### Swift + +#### Objective-C + +example + +SDWebImage 4.x +``` +[imageView sd_setImageWithURL:url placeholderImage:placeholderImage]; +``` + +SDWebImage 5.x +``` +[imageView sd_setImageWithURL:url placeholderImage:placeholderImage]; +``` + +### Entities + +#### Added +... + +#### SDImageCache + +- new initializer `initWithNamespace:diskCacheDirectory:config:`, is now the designated initializer +- moved `maxMemoryCost` and `maxMemoryCountLimit` to `SDImageCacheConfig` +- added `SDImageCache diskImageDataExistsWithKey:` synchronous method +- `addReadOnlyCachePath:` removed, use `additionalCachePathBlock` instead +- `cachePathForKey:inPath:` removed, use `cachePathForKey:` with NSString's path API instead. +- `defaultCachePathForKey:` removed, use `cachePathForKey:` instead + +#### SDImageCacheConfig + +- added `diskCacheWritingOptions` of type `NSDataWritingOptions`, defaults to `NSDataWritingAtomic` +- added `maxMemoryCost` and `maxMemoryCountLimit` properties (used to be in `SDImageCache`) +- `shouldDecompressImages` removed. Use `SDImageCacheAvoidDecodeImage` in cache options instead + +#### SDWebImageManager + +- `loadImageWithURL:options:progress:completed:` changed the `completed` param requirement from `nullable` to `nonnull` +- `loadImageWithURL:options:progress:completed:` return type `id` changed to `SDWebImageCombinedOperation *` +- `shared()` changed to `shared` +- `isRunning()` changed to `isRunning` +- `imageCache` changed from nullable to nonnull +- `imageDownloader` renamed to `imageLoader` and changed from nullable to nonnull +- `cacheKeyFilter` property type changed to `id`, use the `SDWebImageCacheKeyFilter cacheKeyFilterWithBlock:` +- `cacheSerializer` property type CHANGED to `id`, use the `SDWebImageCacheSerializer cacheSerializerWithBlock:` +- `imageCache` property type changed from `SDImageCache *` to `id`. The default value does not change. +- `initWithCache:downloader:` 's `cache` arg type changed from `SDImageCache *` to `id` +- `initWithCache:downloader` renamed to `initWithCache:loader:` +- `saveImageToCache:forURL:` removed. Use `SDImageCache storeImage:imageData:forKey:cacheType:completion:` (or `SDImageCache storeImage:forKey:toDisk:completion:` if you use default cache class) with `cacheKeyForURL:` instead. +- `diskImageExistsForURL:completion:` removed. Use `SDImageCache containsImageForKey:cacheType:completion:` (or `SDImageCache diskImageExistsWithKey:completion:` if you use default cache class) with `cacheKeyForURL:` instead. +- `cachedImageExistsForURL:completion` removed. Use `SDImageCache containsImageForKey:cacheType:completion:` (or `SDImageCache diskImageExistsWithKey:completion:` and `SDImageCache imageFromMemoryCacheForKey:` if you use default cache class) with `cacheKeyForURL:` instead. + +#### SDWebImageManagerDelegate + +- removed `imageManager:transformDownloadedImage:forKey:` + +#### UIView and subclasses (UIImageView, UIButton, ...) + +- `sd_internalSetImageWithURL:placeholderImage:options:operationKey:setImageBlock:progress:completed:` renamed to `UIView sd_internalSetImageWithURL:placeholderImage:options:context:setImageBlock:progress:completed:` (The biggest changes is that the completion block type from `SDExternalCompletionBlock` to `SDInternalCompletionBlock`. Which allow advanced user to get more information of image loading process) +- `sd_internalSetImageWithURL:placeholderImage:options:operationKey:setImageBlock:progress:completed:context:` removed +- activity indicator refactoring - use `sd_imageIndicator` with `SDWebImageActivityIndicator` + - `sd_setShowActivityIndicatorView:` removed + - `sd_setIndicatorStyle:` removed + - `sd_showActivityIndicatorView` removed + - `sd_addActivityIndicator:` removed + - `sd_removeActivityIndicator:` removed + +#### UIImage + +- Renamed `isGIF` to `sd_isAnimated`, also `NSImage isGIF` renamed to `NSImage sd_isAnimated` +- Renamed `decodedImageWithImage:` to `sd_decodedImageWithImage:` +- Renamed `decodedAndScaledDownImageWithImage:` to `sd_decodedAndScaledDownImageWithImage:` +- Removed `sd_webpLoopCount` since we have `sd_imageLoopCount` + +#### UIImageView + +- Removed `sd_setImageWithPreviousCachedImageWithURL:placeholderImage:options:progress:completed` + +#### SDWebImageDownloader + +- `shared()` changed to `shared` +- `setOperationClass` available for Swift user +- `setSuspended(_:)` changed to `isSuspended` property +- `shouldDecompressImages` moved to `SDWebImageDownloaderConfig.shouldDecompressImages` +- `maxConcurrentDownloads` moved to `SDWebImageDownloaderConfig.maxConcurrentDownloads` +- `downloadTimeout` moved to `SDWebImageDownloaderConfig.downloadTimeout` +- `operationClass` moved to `SDWebImageDownloaderConfig.operationClass` +- `executionOrder` moved to `SDWebImageDownloaderConfig.executionOrder` +- `urlCredential` moved to `SDWebImageDownloaderConfig.urlCredential` +- `username` moved to `SDWebImageDownloaderConfig.username` +- `password` moved to `SDWebImageDownloaderConfig.password` +- `initWithSessionConfiguration:` removed, use `initWithConfig:]` with session configuration instead +- `createNewSessionWithConfiguration:` removed, use `initWithConfig:]` with new session configuration instead. To modify shared downloader configuration, provide custom `SDWebImageDownloaderConfig.defaultDownloaderConfig` before it created. +- `headersFilter` removed, use `requestModifier` instead +- `cancel:` removed, use `SDWebImageDownloadToken cancel` instead +- `shouldDecompressImages` removed. Use `SDWebImageDownloaderAvoidDecodeImage` in downloader options instead + +#### SDWebImageDownloaderOperation + +- `initWithRequest:inSession:options:context:` is now the designated initializer +- Removed `shouldUseCredentialStorage` property +- `SDWebImageDownloadOperationInterface` protocol renamed to `SDWebImageDownloadOperation`. (`SDWebImageDownloadOperationProtocol` for Swift) +- `expectedSize` removed, use `response.expectedContentLength` instead +- `shouldDecompressImages` removed. Use `SDWebImageDownloaderAvoidDecodeImage` in downloader options instead. + +#### SDWebImagePrefetcher + +- `prefetchURLs:` and `prefetchURLs:progress:completed:` return types changed from `void` to `SDWebImagePrefetchToken` +- `prefetcherQueue` property renamed to `delegateQueue` +- `maxConcurrentDownloads` property removed, use `SDWebImageManager.downloader` config instead + +#### SDWebImageCoder +- `SDCGColorSpaceGetDeviceRGB()` moved to `SDWebImageCoderHelper colorSpaceGetDeviceRGB` +- `SDCGImageRefContainsAlpha()`, moved to `SDWebImageCoderHelper imageRefContainsAlpha:` +- `decodedImageWithData:` replaced with `decodedImageWithData:options:` +- `encodedDataWithImage:format:` replaced with `encodedDataWithImage:format:options` +- `init` method from `SDWebImageProgressiveCoder` changed to `initIncrementalWithOptions:` +- `incrementalDecodedImageWithData:finished` replaced with `updateIncrementalData:finished` and `incrementalDecodedImageWithOptions:` +- removed `decompressedImage:data:options` + +#### SDWebImageCodersManager + +- `sharedInstance()` changed to `shared` + +#### SDWebImageImageIOCoder + +- `shared()` changed to `shared` + +#### SDWebImageGIFCoder + +- `shared()` changed to `shared` + +#### SDWebImageWebPCoder + +- `shared()` changed to `shared` + +#### NSData-ImageContentType + +- `sd_UTTypeFromSDImageFormat` return `CFString` instead of `Unmanaged` + +#### UIButton-WebCache + +- `sd_currentImageURL()` changed to `sd_currentImageURL` + +#### NSButton-WebCache + +- `sd_currentImageURL()` changed to `sd_currentImageURL` +- `sd_currentAlternateImageURL()` changed to `sd_currentAlternateImageURL` + +#### Constants + +- `SDWebImageInternalSetImageGroupKey` renamed to `SDWebImageContextSetImageGroup` +- `SDWebImageExternalCustomManagerKey` renamed to `SDWebImageContextCustomManager` diff --git a/README.md b/README.md index a1dc3ee2..8721d44b 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ This library provides an async image downloader with cache support. For convenie #### Backwards compatibility -- For iOS 7 and macOS 10.9, use [any 4.x version up to 4.3.3](https://github.com/rs/SDWebImage/releases/tag/4.3.3) +- For iOS 7, macOS 10.9 or Xcode < 8, use [any 4.x version up to 4.3.3](https://github.com/rs/SDWebImage/releases/tag/4.3.3) - For macOS 10.8, use [any 4.x version up to 4.3.0](https://github.com/rs/SDWebImage/releases/tag/4.3.0) - For iOS 5 and 6, use [any 3.x version up to 3.7.6](https://github.com/rs/SDWebImage/tag/3.7.6) - For iOS < 5.0, please use the last [2.0 version](https://github.com/rs/SDWebImage/tree/2.0-compat). @@ -53,6 +53,7 @@ This library provides an async image downloader with cache support. For convenie - Read the [Documentation @ CocoaDocs](http://cocoadocs.org/docsets/SDWebImage/) - Try the example by downloading the project from Github or even easier using CocoaPods try `pod try SDWebImage` - Read the [Installation Guide](https://github.com/rs/SDWebImage/wiki/Installation-Guide) +- Read the [SDWebImage 5.0 Migration Guide](Docs/SDWebImage-5.0-Migration-guide.md) to get an idea of the changes from 4.x to 5.x - Read the [SDWebImage 4.0 Migration Guide](Docs/SDWebImage-4.0-Migration-guide.md) to get an idea of the changes from 3.x to 4.x - Read the [Common Problems](https://github.com/rs/SDWebImage/wiki/Common-Problems) to find the solution for common problems - Go to the [Wiki Page](https://github.com/rs/SDWebImage/wiki) for more information such as [Advanced Usage](https://github.com/rs/SDWebImage/wiki/Advanced-Usage) diff --git a/SDWebImage.podspec b/SDWebImage.podspec index f78dbe94..84ef3a63 100644 --- a/SDWebImage.podspec +++ b/SDWebImage.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'SDWebImage' - s.version = '4.4.1' + s.version = '5.0.0-beta' s.osx.deployment_target = '10.10' s.ios.deployment_target = '8.0' diff --git a/WebImage/Info.plist b/WebImage/Info.plist index 81e2ffa0..77696b33 100644 --- a/WebImage/Info.plist +++ b/WebImage/Info.plist @@ -15,11 +15,11 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 4.4.1 + 5.0.0-beta CFBundleSignature ???? CFBundleVersion - 4.4.1 + 5.0.0-beta NSPrincipalClass From 99b96e4be14a1b7b5e364a20259df8ed1cca5f7c Mon Sep 17 00:00:00 2001 From: Bogdan Poplauschi Date: Thu, 12 Jul 2018 12:35:12 +0300 Subject: [PATCH 2/5] Updates --- CHANGELOG.md | 8 +++-- Docs/SDWebImage-5.0-Migration-guide.md | 41 +++++++++++--------------- Docs/SDWebImage.mdj | 4 +-- 3 files changed, 25 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 762b2a8b..365f4c13 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ See [all tickets marked for the 5.0.0 release](https://github.com/rs/SDWebImage/ #### Infrastructure - the new requirements are **iOS 8.0+** and **macOS 10.10+** #2147 +- **Xcode 9+** #### Backwards incompatible changes @@ -10,7 +11,7 @@ See the [5.0 Migration Guide](Docs/SDWebImage-5.0-Migration-guide.md) for a list #### Features - Introduce `SDAnimatedImageView`, `SDAnimatedImage` and refactor the way we handle animated images #2140 -- Added APNG support via dedicated coder `SDWebImageAPNGCoder` #2149 +- Added APNG support via dedicated coder `SDImageAPNGCoder` #2149 - Refactored `SDWebImageDownloader` configs, separated them into a dedicated `SDWebImageDownloaderConfig` object #2263 - Refactored the way we work with the scale factor #2266 - Created request and response modifier #2261 @@ -30,7 +31,7 @@ See the [5.0 Migration Guide](Docs/SDWebImage-5.0-Migration-guide.md) for a list - Pass `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` and `SDWebImageProgressIndicator` 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 `SDWebImageTransformer` #2219 +- 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 simple `open class var shared { get }` @@ -42,6 +43,9 @@ See the [5.0 Migration Guide](Docs/SDWebImage-5.0-Migration-guide.md) for a list - Remove the extra calculation of image orientation for ImageIO coder & Fix macOS image orientation #2271 - Added `SDWebImageError` (defined as `NS_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` with `sd_setImageWithURL` #2331 +- Add options to specify query cache sync/async behavior #2312 #### Fixes - `SDWebImageManager loadImageWithURL:options:progress:completed:` changed the `completed` param requirement from `nullable` to `nonnull` #2164 diff --git a/Docs/SDWebImage-5.0-Migration-guide.md b/Docs/SDWebImage-5.0-Migration-guide.md index 3aaf0c65..936e42e2 100644 --- a/Docs/SDWebImage-5.0-Migration-guide.md +++ b/Docs/SDWebImage-5.0-Migration-guide.md @@ -3,14 +3,12 @@ SDWebImage 5.0 is the latest major release of SDWebImage, a top library for downloading and caching images. As a major release, following [Semantic Versioning](http://semver.org/) conventions, 5.0 introduces several API-breaking changes with its new architecture. -.... RELEASE_SUMMARY .... - This guide is provided in order to ease the transition of existing applications using SDWebImage 4.X to the latest APIs, as well as explain the design and structure of new and changed functionality. -### Requirements: iOS 8, Mac OS X 10.10, watchOS 2, tvOS 9, Xcode 8 +### Requirements: iOS 8, Mac OS X 10.10, watchOS 2, tvOS 9, Xcode 9 SDWebImage 5.0 officially supports iOS 8 and later, Mac OS X 10.10 and later, watchOS 2 and later and tvOS 9 and later. -It needs Xcode 8 or later to be able to build everything properly. +It needs Xcode 9 or later to be able to build everything properly. For targeting previous versions of the SDKs, check [README - Backwards compatibility](https://github.com/rs/SDWebImage#backwards-compatibility) . @@ -19,25 +17,18 @@ For targeting previous versions of the SDKs, check [README - Backwards compatibi #### Swift +- TBD if needed - + #### Objective-C -example +- TBD if needed - -SDWebImage 4.x -``` -[imageView sd_setImageWithURL:url placeholderImage:placeholderImage]; -``` - -SDWebImage 5.x -``` -[imageView sd_setImageWithURL:url placeholderImage:placeholderImage]; -``` +### FLAnimatedImage support moved to a dedicated plugin repo +We are no longer hosting the integration with `FLAnimatedImage` inside this repo. We have a dedicated repo for that. +TBD ### Entities -#### Added -... - #### SDImageCache - new initializer `initWithNamespace:diskCacheDirectory:config:`, is now the designated initializer @@ -114,6 +105,8 @@ SDWebImage 5.x - `headersFilter` removed, use `requestModifier` instead - `cancel:` removed, use `SDWebImageDownloadToken cancel` instead - `shouldDecompressImages` removed. Use `SDWebImageDownloaderAvoidDecodeImage` in downloader options instead +- use `SDWebImageLoaderProgressBlock` instead of `SDWebImageDownloaderProgressBlock` +- use `SDWebImageLoaderCompletedBlock` instead of `SDWebImageDownloaderCompletedBlock` #### SDWebImageDownloaderOperation @@ -129,28 +122,28 @@ SDWebImage 5.x - `prefetcherQueue` property renamed to `delegateQueue` - `maxConcurrentDownloads` property removed, use `SDWebImageManager.downloader` config instead -#### SDWebImageCoder -- `SDCGColorSpaceGetDeviceRGB()` moved to `SDWebImageCoderHelper colorSpaceGetDeviceRGB` -- `SDCGImageRefContainsAlpha()`, moved to `SDWebImageCoderHelper imageRefContainsAlpha:` +#### SDImageCoder +- `SDCGColorSpaceGetDeviceRGB()` moved to `SDImageCoderHelper colorSpaceGetDeviceRGB` +- `SDCGImageRefContainsAlpha()`, moved to `SDImageCoderHelper imageRefContainsAlpha:` - `decodedImageWithData:` replaced with `decodedImageWithData:options:` - `encodedDataWithImage:format:` replaced with `encodedDataWithImage:format:options` - `init` method from `SDWebImageProgressiveCoder` changed to `initIncrementalWithOptions:` - `incrementalDecodedImageWithData:finished` replaced with `updateIncrementalData:finished` and `incrementalDecodedImageWithOptions:` - removed `decompressedImage:data:options` -#### SDWebImageCodersManager +#### SDImageCodersManager - `sharedInstance()` changed to `shared` -#### SDWebImageImageIOCoder +#### SDImageIOCoder - `shared()` changed to `shared` -#### SDWebImageGIFCoder +#### SDImageGIFCoder - `shared()` changed to `shared` -#### SDWebImageWebPCoder +#### SDImageWebPCoder - `shared()` changed to `shared` diff --git a/Docs/SDWebImage.mdj b/Docs/SDWebImage.mdj index 9f5f7db3..dfbccdcf 100644 --- a/Docs/SDWebImage.mdj +++ b/Docs/SDWebImage.mdj @@ -20261,7 +20261,7 @@ "_parent": { "$ref": "AAAAAAFUkhyNUo23oFw=" }, - "name": "SDWebImageProgressiveDownload", + "name": "SDWebImageProgressiveLoad", "visibility": "public" }, { @@ -22759,4 +22759,4 @@ "visibility": "public" } ] -} \ No newline at end of file +} From bc44c5e438c53d38c79f11023c32b9cb9f6e3360 Mon Sep 17 00:00:00 2001 From: Bogdan Poplauschi Date: Thu, 12 Jul 2018 20:54:03 +0300 Subject: [PATCH 3/5] Reviewed version of the migration guide - with @dreampiggy + added the API-Diff generated by @dreampiggy using objc-diff --- Docs/API-Diff/5.0/apidiff.css | 103 ++ Docs/API-Diff/5.0/apidiff.html | 1222 ++++++++++++++++++++++++ Docs/SDWebImage-5.0-Migration-guide.md | 133 ++- 3 files changed, 1415 insertions(+), 43 deletions(-) create mode 100644 Docs/API-Diff/5.0/apidiff.css create mode 100644 Docs/API-Diff/5.0/apidiff.html diff --git a/Docs/API-Diff/5.0/apidiff.css b/Docs/API-Diff/5.0/apidiff.css new file mode 100644 index 00000000..06231d30 --- /dev/null +++ b/Docs/API-Diff/5.0/apidiff.css @@ -0,0 +1,103 @@ +body { + font: 12px 'Lucida Grande', 'Lucida Sans Unicode', Helvetica, Arial, Verdana, sans-serif; + margin: 0; + padding: 0 2em 2em 2em; +} + +h1 { + margin-top: 30px; + margin-bottom: 30px; + font-size: 28px; + font-weight: bold; +} + +.headerFile { + margin-left: 20px; +} + +.headerName { + margin: 15px 0px 10px -20px; + padding: 4px 4px 4px 20px; + font-weight: bold; + font-size: 120%; + background-color: #f8f8f8; +} + +.differenceGroup { + margin-top: 5px; +} + +.difference { + padding-left: 20px; + font-family: Courier, Consolas, monospace; + font-size: 110%; +} + +.status { + font-style: italic; + font-size: 80%; +} + +.removed { + color: red; +} + +.added { + color: blue; +} + +.modified { + color: #080; +} + +.declaration { + font-family: Courier, Consolas, monospace; +} + +table { + border: 1px #888 solid; + padding: 2px; + border-spacing: 0px; + border-collapse: collapse; + margin-left: 40px; + margin-top: 7px; +} + +td, th { + font-size: 10px; + border: 1px #888 solid; + padding:3px 6px; +} + +th { + font-size: 10px; + text-align: center; + background-color: #eee; +} + +td { + font-size: 90%; + text-align: left; +} + +ul { + list-style: disc outside; + margin: 0 0 0 16px; + padding: 0; +} + +li { + margin-top: 7px; +} + +.message { + margin-left: 20px; + font-style: italic; + color: #888; +} + +a:link { color: #18396E; text-decoration: none; } +a:active { color: #18396E; text-decoration: none; } +a:visited { color: #003366; text-decoration: none; } +a:link:hover { color: #18396E; text-decoration: underline; } +a:visited:hover { color: #003366; text-decoration: underline; } diff --git a/Docs/API-Diff/5.0/apidiff.html b/Docs/API-Diff/5.0/apidiff.html new file mode 100644 index 00000000..02d5349f --- /dev/null +++ b/Docs/API-Diff/5.0/apidiff.html @@ -0,0 +1,1222 @@ + + + + + + + +
+
FLAnimatedImageView+WebCache.h
+ +
+
Modified -[FLAnimatedImageView sd_setImageWithURL:placeholderImage:options:progress:completed:]
+ + + + +
Declaration
From- (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock completed:(nullable SDExternalCompletionBlock)completedBlock
To- (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options progress:(nullable SDImageLoaderProgressBlock)progressBlock completed:(nullable SDExternalCompletionBlock)completedBlock
+
+
+ +
+ +
+
MKAnnotationView+WebCache.h
+ +
+
Added -[MKAnnotationView sd_setImageWithURL:placeholderImage:options:context:]
+
Added -[MKAnnotationView sd_setImageWithURL:placeholderImage:options:progress:completed:]
+
Added -[MKAnnotationView sd_setImageWithURL:placeholderImage:options:context:progress:completed:]
+
+ +
+ +
+
SDAnimatedImage.h
+ +
+
Added SDAnimatedImage
+
Added -[SDAnimatedImage initWithAnimatedCoder:scale:]
+
Added -[SDAnimatedImage preloadAllFrames]
+
Added -[SDAnimatedImage unloadAllFrames]
+
Added -[SDAnimatedImage isAllFramesLoaded]
+
Added SDAnimatedImage
+
Added +[SDAnimatedImage imageNamed:]
+
Added +[SDAnimatedImage imageNamed:inBundle:compatibleWithTraitCollection:]
+
Added +[SDAnimatedImage imageWithContentsOfFile:]
+
Added +[SDAnimatedImage imageWithData:]
+
Added +[SDAnimatedImage imageWithData:scale:]
+
Added -[SDAnimatedImage initWithContentsOfFile:]
+
Added -[SDAnimatedImage initWithData:]
+
Added -[SDAnimatedImage initWithData:scale:]
+
Added -[SDAnimatedImage initWithAnimatedCoder:scale:]
+
Added SDAnimatedImage.animatedImageFormat
+
Added SDAnimatedImage.animatedImageData
+
Added SDAnimatedImage.scale
+
Added -[SDAnimatedImage preloadAllFrames]
+
Added -[SDAnimatedImage unloadAllFrames]
+
Added SDAnimatedImage.allFramesLoaded
+
+ +
+ +
+
SDAnimatedImageView.h
+ +
+
Added SDAnimatedImageView
+
Added SDAnimatedImageView.currentFrame
+
Added SDAnimatedImageView.currentFrameIndex
+
Added SDAnimatedImageView.currentLoopCount
+
Added SDAnimatedImageView.shouldCustomLoopCount
+
Added SDAnimatedImageView.animationRepeatCount
+
Added SDAnimatedImageView.maxBufferSize
+
Added SDAnimatedImageView.shouldIncrementalLoad
+
Added SDAnimatedImageView.runLoopMode
+
+ +
+ +
+
SDAnimatedImageView+WebCache.h
+ +
+
Added -[SDAnimatedImageView sd_setImageWithURL:]
+
Added -[SDAnimatedImageView sd_setImageWithURL:placeholderImage:]
+
Added -[SDAnimatedImageView sd_setImageWithURL:placeholderImage:options:]
+
Added -[SDAnimatedImageView sd_setImageWithURL:placeholderImage:options:context:]
+
Added -[SDAnimatedImageView sd_setImageWithURL:completed:]
+
Added -[SDAnimatedImageView sd_setImageWithURL:placeholderImage:completed:]
+
Added -[SDAnimatedImageView sd_setImageWithURL:placeholderImage:options:completed:]
+
Added -[SDAnimatedImageView sd_setImageWithURL:placeholderImage:options:progress:completed:]
+
Added -[SDAnimatedImageView sd_setImageWithURL:placeholderImage:options:context:progress:completed:]
+
+ +
+ +
+
SDDiskCache.h
+ +
+
Added SDDiskCache
+
Added -[SDDiskCache initWithCachePath:config:]
+
Added -[SDDiskCache containsDataForKey:]
+
Added -[SDDiskCache dataForKey:]
+
Added -[SDDiskCache setData:forKey:]
+
Added -[SDDiskCache removeDataForKey:]
+
Added -[SDDiskCache removeAllData]
+
Added -[SDDiskCache removeExpiredData]
+
Added -[SDDiskCache cachePathForKey:]
+
Added -[SDDiskCache totalCount]
+
Added -[SDDiskCache totalSize]
+
Added SDDiskCache
+
Added SDDiskCache.config
+
+ +
+ +
+
SDImageAPNGCoder.h
+ +
+
Added SDImageAPNGCoder
+
Added SDImageAPNGCoder.sharedCoder
+
+ +
+ +
+
SDImageCache.h
+ +
+
Removed SDImageCacheQueryDataWhenInMemory
+
Removed SDImageCacheQueryDiskSync
+
Removed SDCacheQueryCompletedBlock
+
Removed SDWebImageCheckCacheCompletionBlock
+
Removed SDWebImageCalculateSizeBlock
+
Removed SDImageCache.maxMemoryCost
+
Removed SDImageCache.maxMemoryCountLimit
+
Removed -[SDImageCache makeDiskCachePath:]
+
Removed -[SDImageCache addReadOnlyCachePath:]
+
Removed -[SDImageCache cachePathForKey:inPath:]
+
Removed -[SDImageCache defaultCachePathForKey:]
+
+ + +
+
Added SDImageCacheQueryMemoryData
+
Added SDImageCacheQueryMemoryDataSync
+
Added SDImageCacheQueryDiskDataSync
+
Added SDImageCacheAvoidDecodeImage
+
Added SDImageCacheDecodeFirstFrameOnly
+
Added SDImageCachePreloadAllFrames
+
Added SDImageCache.diskCachePath
+
Added SDImageCache.additionalCachePathBlock
+
Added -[SDImageCache initWithNamespace:diskCacheDirectory:config:]
+
Added -[SDImageCache cachePathForKey:]
+
Added -[SDImageCache storeImageToMemory:forKey:]
+
Added -[SDImageCache queryCacheOperationForKey:options:context:done:]
+
Added -[SDImageCache removeImageFromMemoryForKey:]
+
Added -[SDImageCache removeImageFromDiskForKey:]
+
+ + +
+
Modified SDImageCache
+ + + + +
Protocols
Fromnone
ToSDImageCache
+
+
Modified SDImageCache.config
+ + + + +
Declaration
From@property (nonatomic, readonly, nonnull) SDImageCacheConfig *config
To@property (nonatomic, readonly, copy, nonnull) SDImageCacheConfig *config
+
+
Modified +[SDImageCache sharedImageCache]
+ + + + +
Declaration
From+ (nonnull instancetype)sharedImageCache
To@property (class, nonatomic, readonly, nonnull) SDImageCache *sharedImageCache
+
+
Modified -[SDImageCache diskImageExistsWithKey:completion:]
+ + + + +
Declaration
From- (void)diskImageExistsWithKey:(nullable NSString *)key completion:(nullable SDWebImageCheckCacheCompletionBlock)completionBlock
To- (void)diskImageExistsWithKey:(nullable NSString *)key completion:(nullable SDImageCacheCheckCompletionBlock)completionBlock
+
+
Modified -[SDImageCache queryCacheOperationForKey:done:]
+ + + + +
Declaration
From- (nullable NSOperation *)queryCacheOperationForKey:(nullable NSString *)key done:(nullable SDCacheQueryCompletedBlock)doneBlock
To- (nullable NSOperation *)queryCacheOperationForKey:(nullable NSString *)key done:(nullable SDImageCacheQueryCompletionBlock)doneBlock
+
+
Modified -[SDImageCache queryCacheOperationForKey:options:done:]
+ + + + +
Declaration
From- (nullable NSOperation *)queryCacheOperationForKey:(nullable NSString *)key options:(SDImageCacheOptions)options done:(nullable SDCacheQueryCompletedBlock)doneBlock
To- (nullable NSOperation *)queryCacheOperationForKey:(nullable NSString *)key options:(SDImageCacheOptions)options done:(nullable SDImageCacheQueryCompletionBlock)doneBlock
+
+
Modified -[SDImageCache calculateSizeWithCompletionBlock:]
+ + + + +
Declaration
From- (void)calculateSizeWithCompletionBlock:(nullable SDWebImageCalculateSizeBlock)completionBlock
To- (void)calculateSizeWithCompletionBlock:(nullable SDImageCacheCalculateSizeBlock)completionBlock
+
+
+ +
+ +
+
SDImageCacheConfig.h
+ +
+
Removed SDImageCacheConfig.shouldDecompressImages
+
+ + +
+
Added SDImageCacheConfig.defaultCacheConfig
+
Added SDImageCacheConfig.shouldRemoveExpiredDataWhenEnterBackground
+
Added SDImageCacheConfig.maxMemoryCost
+
Added SDImageCacheConfig.maxMemoryCount
+
Added SDImageCacheConfig.namespacePrefix
+
Added SDImageCacheConfig.fileManager
+
Added SDImageCacheConfig.memoryCacheClass
+
Added SDImageCacheConfig.diskCacheClass
+
+ + +
+
Modified SDImageCacheConfig
+ + + + +
Protocols
Fromnone
ToNSCopying
+
+
Modified SDImageCacheConfig.maxCacheAge
+ + + + +
Declaration
From@property (nonatomic, assign) NSInteger maxCacheAge
To@property (nonatomic, assign) NSTimeInterval maxCacheAge
+
+
+ +
+ +
+
SDImageCacheDefine.h
+ +
+
Added SDImageCacheTypeAll
+
Added SDImageCacheCheckCompletionBlock
+
Added SDImageCacheCalculateSizeBlock
+
Added SDImageCacheAdditionalCachePathBlock
+
Added SDImageCacheQueryCompletionBlock
+
Added SDImageCacheContainsCompletionBlock
+
Added SDImageCacheDecodeImageData()
+
Added SDImageCache
+
Added -[SDImageCache queryImageForKey:options:context:completion:]
+
Added -[SDImageCache storeImage:imageData:forKey:cacheType:completion:]
+
Added -[SDImageCache removeImageForKey:cacheType:completion:]
+
Added -[SDImageCache containsImageForKey:cacheType:completion:]
+
Added -[SDImageCache clearWithCacheType:completion:]
+
+ +
+ +
+
SDImageCachesManager.h
+ +
+
Added SDImageCachesManagerOperationPolicy
+
Added SDImageCachesManagerOperationPolicySerial
+
Added SDImageCachesManagerOperationPolicyConcurrent
+
Added SDImageCachesManagerOperationPolicyHighestOnly
+
Added SDImageCachesManagerOperationPolicyLowestOnly
+
Added SDImageCachesManager
+
Added SDImageCachesManager.sharedManager
+
Added SDImageCachesManager.queryOperationPolicy
+
Added SDImageCachesManager.storeOperationPolicy
+
Added SDImageCachesManager.removeOperationPolicy
+
Added SDImageCachesManager.containsOperationPolicy
+
Added SDImageCachesManager.clearOperationPolicy
+
Added SDImageCachesManager.caches
+
Added -[SDImageCachesManager addCache:]
+
Added -[SDImageCachesManager removeCache:]
+
+ +
+ +
+
SDImageCoder.h
+ +
+
Added SDImageCoderOption
+
Added SDImageCoderOptions
+
Added SDImageCoderDecodeFirstFrameOnly
+
Added SDImageCoderDecodeScaleFactor
+
Added SDImageCoderEncodeFirstFrameOnly
+
Added SDImageCoderEncodeCompressionQuality
+
Added SDImageCoder
+
Added -[SDImageCoder canDecodeFromData:]
+
Added -[SDImageCoder decodedImageWithData:options:]
+
Added -[SDImageCoder canEncodeToFormat:]
+
Added -[SDImageCoder encodedDataWithImage:format:options:]
+
Added SDProgressiveImageCoder
+
Added -[SDProgressiveImageCoder canIncrementalDecodeFromData:]
+
Added -[SDProgressiveImageCoder initIncrementalWithOptions:]
+
Added -[SDProgressiveImageCoder updateIncrementalData:finished:]
+
Added -[SDProgressiveImageCoder incrementalDecodedImageWithOptions:]
+
Added SDAnimatedImageProvider
+
Added -[SDAnimatedImageProvider animatedImageData]
+
Added -[SDAnimatedImageProvider animatedImageFrameCount]
+
Added -[SDAnimatedImageProvider animatedImageLoopCount]
+
Added -[SDAnimatedImageProvider animatedImageFrameAtIndex:]
+
Added -[SDAnimatedImageProvider animatedImageDurationAtIndex:]
+
Added SDAnimatedImageCoder
+
Added -[SDAnimatedImageCoder initWithAnimatedImageData:options:]
+
+ +
+ +
+
SDImageCoderHelper.h
+ +
+
Added SDImageCoderHelper
+
Added +[SDImageCoderHelper animatedImageWithFrames:]
+
Added +[SDImageCoderHelper framesFromAnimatedImage:]
+
Added +[SDImageCoderHelper colorSpaceGetDeviceRGB]
+
Added +[SDImageCoderHelper CGImageContainsAlpha:]
+
Added +[SDImageCoderHelper CGImageCreateDecoded:]
+
Added +[SDImageCoderHelper CGImageCreateDecoded:orientation:]
+
Added +[SDImageCoderHelper decodedImageWithImage:]
+
Added +[SDImageCoderHelper decodedAndScaledDownImageWithImage:limitBytes:]
+
Added +[SDImageCoderHelper imageOrientationFromEXIFOrientation:]
+
Added +[SDImageCoderHelper exifOrientationFromImageOrientation:]
+
+ +
+ +
+
SDImageCodersManager.h
+ +
+
Added SDImageCodersManager
+
Added SDImageCodersManager.sharedManager
+
Added SDImageCodersManager.coders
+
Added -[SDImageCodersManager addCoder:]
+
Added -[SDImageCodersManager removeCoder:]
+
+ +
+ +
+
SDImageFrame.h
+ +
+
Added SDImageFrame
+
Added SDImageFrame.image
+
Added SDImageFrame.duration
+
Added +[SDImageFrame frameWithImage:duration:]
+
+ +
+ +
+
SDImageGIFCoder.h
+ +
+
Added SDImageGIFCoder
+
Added SDImageGIFCoder.sharedCoder
+
+ +
+ +
+
SDImageIOCoder.h
+ +
+
Added SDImageIOCoder
+
Added SDImageIOCoder.sharedCoder
+
+ +
+ +
+
SDImageLoader.h
+ +
+
Added SDImageLoaderProgressBlock
+
Added SDImageLoaderCompletedBlock
+
Added SDWebImageContextLoaderCachedImage
+
Added SDImageLoaderDecodeImageData()
+
Added SDImageLoaderDecodeProgressiveImageData()
+
Added SDImageLoader
+
Added -[SDImageLoader canLoadWithURL:]
+
Added -[SDImageLoader loadImageWithURL:options:context:progress:completed:]
+
+ +
+ +
+
SDImageLoadersManager.h
+ +
+
Added SDImageLoadersManager
+
Added SDImageLoadersManager.sharedManager
+
Added SDImageLoadersManager.loaders
+
Added -[SDImageLoadersManager addLoader:]
+
Added -[SDImageLoadersManager removeLoader:]
+
+ +
+ +
+
SDImageTransformer.h
+ +
+
Added SDTransformedKeyForKey()
+
Added SDImageTransformer
+
Added -[SDImageTransformer transformerKey]
+
Added -[SDImageTransformer transformedImageWithImage:forKey:]
+
Added SDImagePipelineTransformer
+
Added SDImagePipelineTransformer.transformers
+
Added +[SDImagePipelineTransformer transformerWithTransformers:]
+
Added SDImageRoundCornerTransformer
+
Added SDImageRoundCornerTransformer.cornerRadius
+
Added SDImageRoundCornerTransformer.corners
+
Added SDImageRoundCornerTransformer.borderWidth
+
Added SDImageRoundCornerTransformer.borderColor
+
Added +[SDImageRoundCornerTransformer transformerWithRadius:corners:borderWidth:borderColor:]
+
Added SDImageResizingTransformer
+
Added SDImageResizingTransformer.size
+
Added SDImageResizingTransformer.scaleMode
+
Added +[SDImageResizingTransformer transformerWithSize:scaleMode:]
+
Added SDImageCroppingTransformer
+
Added SDImageCroppingTransformer.rect
+
Added +[SDImageCroppingTransformer transformerWithRect:]
+
Added SDImageFlippingTransformer
+
Added SDImageFlippingTransformer.horizontal
+
Added SDImageFlippingTransformer.vertical
+
Added +[SDImageFlippingTransformer transformerWithHorizontal:vertical:]
+
Added SDImageRotationTransformer
+
Added SDImageRotationTransformer.angle
+
Added SDImageRotationTransformer.fitSize
+
Added +[SDImageRotationTransformer transformerWithAngle:fitSize:]
+
Added SDImageTintTransformer
+
Added SDImageTintTransformer.tintColor
+
Added +[SDImageTintTransformer transformerWithColor:]
+
Added SDImageBlurTransformer
+
Added SDImageBlurTransformer.blurRadius
+
Added +[SDImageBlurTransformer transformerWithRadius:]
+
Added SDImageFilterTransformer
+
Added SDImageFilterTransformer.filter
+
Added +[SDImageFilterTransformer transformerWithFilter:]
+
+ +
+ +
+
SDMemoryCache.h
+ +
+
Added SDMemoryCacheCostForImage()
+
Added SDMemoryCache
+
Added -[SDMemoryCache initWithConfig:]
+
Added -[SDMemoryCache objectForKey:]
+
Added -[SDMemoryCache setObject:forKey:]
+
Added -[SDMemoryCache setObject:forKey:cost:]
+
Added -[SDMemoryCache removeObjectForKey:]
+
Added -[SDMemoryCache removeAllObjects]
+
Added SDMemoryCache
+
Added SDMemoryCache.config
+
+ +
+ +
+
SDWebImageCacheKeyFilter.h
+ +
+
Added SDWebImageCacheKeyFilter
+
Added -[SDWebImageCacheKeyFilter cacheKeyForURL:]
+
Added SDWebImageCacheKeyFilter
+
Added -[SDWebImageCacheKeyFilter initWithBlock:]
+
Added +[SDWebImageCacheKeyFilter cacheKeyFilterWithBlock:]
+
+ + +
+
Modified SDWebImageCacheKeyFilterBlock
+ + + + +
Declaration
Fromtypedef NSString * _Nullable (^SDWebImageCacheKeyFilterBlock)(NSURL * _Nullable url)
Totypedef NSString * _Nullable (^SDWebImageCacheKeyFilterBlock)(NSURL * _Nonnull url)
+
+
+ +
+ +
+
SDWebImageCacheSerializer.h
+ +
+
Added SDWebImageCacheSerializer
+
Added -[SDWebImageCacheSerializer cacheDataWithImage:originalData:imageURL:]
+
Added SDWebImageCacheSerializer
+
Added -[SDWebImageCacheSerializer initWithBlock:]
+
Added +[SDWebImageCacheSerializer cacheSerializerWithBlock:]
+
+ +
+ +
+
SDWebImageCoder.h
+ +
+
Removed SDWebImageCoderScaleDownLargeImagesKey
+
Removed SDCGColorSpaceGetDeviceRGB()
+
Removed SDCGImageRefContainsAlpha()
+
Removed SDWebImageCoder
+
Removed -[SDWebImageCoder canDecodeFromData:]
+
Removed -[SDWebImageCoder decodedImageWithData:]
+
Removed -[SDWebImageCoder decompressedImageWithImage:data:options:]
+
Removed -[SDWebImageCoder canEncodeToFormat:]
+
Removed -[SDWebImageCoder encodedDataWithImage:format:]
+
Removed SDWebImageProgressiveCoder
+
Removed -[SDWebImageProgressiveCoder canIncrementallyDecodeFromData:]
+
Removed -[SDWebImageProgressiveCoder incrementallyDecodedImageWithData:finished:]
+
+ +
+ +
+
SDWebImageCoderHelper.h
+ +
+
Removed SDWebImageCoderHelper
+
Removed +[SDWebImageCoderHelper animatedImageWithFrames:]
+
Removed +[SDWebImageCoderHelper framesFromAnimatedImage:]
+
Removed +[SDWebImageCoderHelper imageOrientationFromEXIFOrientation:]
+
Removed +[SDWebImageCoderHelper exifOrientationFromImageOrientation:]
+
+ +
+ +
+
SDWebImageCodersManager.h
+ +
+
Removed SDWebImageCodersManager
+
Removed +[SDWebImageCodersManager sharedInstance]
+
Removed SDWebImageCodersManager.coders
+
Removed -[SDWebImageCodersManager addCoder:]
+
Removed -[SDWebImageCodersManager removeCoder:]
+
+ +
+ +
+
SDWebImageCompat.h
+ +
+
Removed #def dispatch_queue_async_safe
+
+ +
+ +
+
SDWebImageDefine.h
+ +
+
Added SDWebImageContextOption
+
Added SDWebImageContext
+
Added SDWebImageMutableContext
+
Added SDImageScaleFactorForKey()
+
Added SDScaledImageForScaleFactor()
+
Added SDWebImageProgressiveLoad
+
Added SDWebImageQueryMemoryData
+
Added SDWebImageQueryMemoryDataSync
+
Added SDWebImageQueryDiskDataSync
+
Added SDWebImageFromLoaderOnly
+
Added SDWebImageAvoidDecodeImage
+
Added SDWebImageDecodeFirstFrameOnly
+
Added SDWebImagePreloadAllFrames
+
Added SDWebImageContextSetImageOperationKey
+
Added SDWebImageContextSetImageGroup
+
Added SDWebImageContextCustomManager
+
Added SDWebImageContextImageTransformer
+
Added SDWebImageContextImageScaleFactor
+
Added SDWebImageContextStoreCacheType
+
Added SDWebImageContextAnimatedImageClass
+
Added SDWebImageContextDownloadRequestModifier
+
Added SDWebImageContextCacheKeyFilter
+
Added SDWebImageContextCacheSerializer
+
+ + +
+
Modified SDScaledImageForKey()
+ + + + +
Declaration
FromUIImage *SDScaledImageForKey(NSString *key, UIImage *image)
ToUIImage * _Nullable SDScaledImageForKey(NSString * _Nullable key, UIImage * _Nullable image)
+
+
+ +
+ +
+
SDWebImageDownloader.h
+ +
+
Removed SDWebImageDownloaderProgressiveDownload
+
Removed SDHTTPHeadersDictionary
+
Removed SDHTTPHeadersMutableDictionary
+
Removed SDWebImageDownloaderHeadersFilterBlock
+
Removed SDWebImageDownloadToken.downloadOperationCancelToken
+
Removed SDWebImageDownloader.shouldDecompressImages
+
Removed SDWebImageDownloader.maxConcurrentDownloads
+
Removed SDWebImageDownloader.downloadTimeout
+
Removed SDWebImageDownloader.executionOrder
+
Removed SDWebImageDownloader.urlCredential
+
Removed SDWebImageDownloader.username
+
Removed SDWebImageDownloader.password
+
Removed SDWebImageDownloader.headersFilter
+
Removed -[SDWebImageDownloader initWithSessionConfiguration:]
+
Removed -[SDWebImageDownloader setOperationClass:]
+
Removed -[SDWebImageDownloader cancel:]
+
Removed -[SDWebImageDownloader createNewSessionWithConfiguration:]
+
+ + +
+
Added SDWebImageDownloaderProgressiveLoad
+
Added SDWebImageDownloaderAvoidDecodeImage
+
Added SDWebImageDownloaderDecodeFirstFrameOnly
+
Added SDWebImageDownloaderPreloadAllFrames
+
Added -[SDWebImageDownloadToken cancel]
+
Added SDWebImageDownloadToken.request
+
Added SDWebImageDownloadToken.response
+
Added SDWebImageDownloader.config
+
Added SDWebImageDownloader.requestModifier
+
Added -[SDWebImageDownloader initWithConfig:]
+
Added -[SDWebImageDownloader downloadImageWithURL:options:context:progress:completed:]
+
+ + +
+
Modified SDWebImageDownloaderProgressBlock
+ + + + +
Declaration
Fromtypedef void (^SDWebImageDownloaderProgressBlock)(NSInteger receivedSize, NSInteger expectedSize, NSURL * _Nullable targetURL)
Totypedef SDWebImageDownloaderProgressBlock SDWebImageDownloaderProgressBlock
+
+
Modified SDWebImageDownloaderCompletedBlock
+ + + + +
Declaration
Fromtypedef void (^SDWebImageDownloaderCompletedBlock)(UIImage * _Nullable image, NSData * _Nullable data, NSError * _Nullable error, BOOL finished)
Totypedef SDWebImageDownloaderCompletedBlock SDWebImageDownloaderCompletedBlock
+
+
Modified SDWebImageDownloadToken.url
+ + + + +
Declaration
From@property (nonatomic, strong, nullable) NSURL *url
To@property (nonatomic, readonly, strong, nullable) NSURL *url
+
+
Modified SDWebImageDownloader
+ + + + +
Protocols
Fromnone
ToSDImageLoader
+
+
Modified -[SDWebImageDownloader setSuspended:]
+ + + + +
Declaration
From- (void)setSuspended:(BOOL)suspended
To@property (nonatomic, assign, getter=isSuspended) BOOL suspended
+
+
Modified SDWebImageDownloader.currentDownloadCount
+ + + + +
Declaration
From@property (nonatomic, readonly) NSUInteger currentDownloadCount
To@property (nonatomic, readonly, assign) NSUInteger currentDownloadCount
+
+
Modified +[SDWebImageDownloader sharedDownloader]
+ + + + +
Declaration
From+ (nonnull instancetype)sharedDownloader
To@property (class, nonatomic, readonly, nonnull) SDWebImageDownloader *sharedDownloader
+
+
+ +
+ +
+
SDWebImageDownloaderConfig.h
+ +
+
Added SDWebImageDownloaderConfig
+
Added SDWebImageDownloaderConfig.defaultDownloaderConfig
+
Added SDWebImageDownloaderConfig.maxConcurrentDownloads
+
Added SDWebImageDownloaderConfig.downloadTimeout
+
Added SDWebImageDownloaderConfig.sessionConfiguration
+
Added SDWebImageDownloaderConfig.operationClass
+
Added SDWebImageDownloaderConfig.executionOrder
+
Added SDWebImageDownloaderConfig.urlCredential
+
Added SDWebImageDownloaderConfig.username
+
Added SDWebImageDownloaderConfig.password
+
+ +
+ +
+
SDWebImageDownloaderOperation.h
+ +
+
Removed SDWebImageDownloaderOperationInterface
+
Removed -[SDWebImageDownloaderOperationInterface initWithRequest:inSession:options:]
+
Removed -[SDWebImageDownloaderOperationInterface addHandlersForProgress:completed:]
+
Removed -[SDWebImageDownloaderOperationInterface shouldDecompressImages]
+
Removed -[SDWebImageDownloaderOperationInterface setShouldDecompressImages:]
+
Removed -[SDWebImageDownloaderOperationInterface credential]
+
Removed -[SDWebImageDownloaderOperationInterface setCredential:]
+
Removed -[SDWebImageDownloaderOperationInterface cancel:]
+
Removed SDWebImageDownloaderOperation.shouldDecompressImages
+
Removed SDWebImageDownloaderOperation.shouldUseCredentialStorage
+
Removed SDWebImageDownloaderOperation.expectedSize
+
+ + +
+
Added SDWebImageDownloaderOperation
+
Added -[SDWebImageDownloaderOperation initWithRequest:inSession:options:]
+
Added -[SDWebImageDownloaderOperation initWithRequest:inSession:options:context:]
+
Added -[SDWebImageDownloaderOperation addHandlersForProgress:completed:]
+
Added -[SDWebImageDownloaderOperation credential]
+
Added -[SDWebImageDownloaderOperation setCredential:]
+
Added -[SDWebImageDownloaderOperation cancel:]
+
Added -[SDWebImageDownloaderOperation request]
+
Added -[SDWebImageDownloaderOperation response]
+
Added -[SDWebImageDownloaderOperation dataTask]
+
Added SDWebImageDownloaderOperation.context
+
Added -[SDWebImageDownloaderOperation initWithRequest:inSession:options:context:]
+
+ + +
+
Modified SDWebImageDownloaderOperation
+ + + + +
Protocols
FromNSURLSessionDataDelegate, NSURLSessionTaskDelegate, SDWebImageDownloaderOperationInterface, SDWebImageOperation
ToSDWebImageDownloaderOperation
+
+
Modified SDWebImageDownloaderOperation.response
+ + + + +
Declaration
From@property (nonatomic, strong, nullable) NSURLResponse *response
To@property (nonatomic, readonly, strong, nullable) NSURLResponse *response
+
+
+ +
+ +
+
SDWebImageDownloaderRequestModifier.h
+ +
+
Added SDWebImageDownloaderRequestModifierBlock
+
Added SDWebImageDownloaderRequestModifier
+
Added -[SDWebImageDownloaderRequestModifier modifiedRequestWithRequest:]
+
Added SDWebImageDownloaderRequestModifier
+
Added -[SDWebImageDownloaderRequestModifier initWithBlock:]
+
Added +[SDWebImageDownloaderRequestModifier requestModifierWithBlock:]
+
+ +
+ +
+
SDWebImageError.h
+ +
+
Added SDWebImageErrorDownloadStatusCodeKey
+
Added SDWebImageError
+
Added SDWebImageErrorInvalidURL
+
Added SDWebImageErrorBadImageData
+
Added SDWebImageErrorCacheNotModified
+
Added SDWebImageErrorInvalidDownloadOperation
+
Added SDWebImageErrorInvalidDownloadStatusCode
+
+ + +
+
Modified SDWebImageErrorDomain
+ + + + +
Declaration
FromNSString *const SDWebImageErrorDomain
ToNSErrorDomain _Nonnull const SDWebImageErrorDomain
+
+
+ +
+ +
+
SDWebImageFrame.h
+ +
+
Removed SDWebImageFrame
+
Removed SDWebImageFrame.image
+
Removed SDWebImageFrame.duration
+
Removed +[SDWebImageFrame frameWithImage:duration:]
+
+ +
+ +
+
SDWebImageGIFCoder.h
+ +
+
Removed SDWebImageGIFCoder
+
Removed +[SDWebImageGIFCoder sharedCoder]
+
+ +
+ +
+
SDWebImageImageIOCoder.h
+ +
+
Removed SDWebImageImageIOCoder
+
Removed +[SDWebImageImageIOCoder sharedCoder]
+
+ +
+ +
+
SDWebImageIndicator.h
+ +
+
Added SDWebImageIndicator
+
Added -[SDWebImageIndicator indicatorView]
+
Added -[SDWebImageIndicator startAnimatingIndicator]
+
Added -[SDWebImageIndicator stopAnimatingIndicator]
+
Added -[SDWebImageIndicator updateIndicatorProgress:]
+
Added SDWebImageActivityIndicator
+
Added SDWebImageActivityIndicator.indicatorView
+
Added SDWebImageActivityIndicator.grayIndicator
+
Added SDWebImageActivityIndicator.grayLargeIndicator
+
Added SDWebImageActivityIndicator.whiteIndicator
+
Added SDWebImageActivityIndicator.whiteLargeIndicator
+
Added SDWebImageProgressIndicator
+
Added SDWebImageProgressIndicator.indicatorView
+
Added SDWebImageProgressIndicator.defaultIndicator
+
Added SDWebImageProgressIndicator.barIndicator
+
+ +
+ +
+
SDWebImageManager.h
+ +
+
Removed SDWebImageCacheMemoryOnly
+
Removed SDWebImageProgressiveDownload
+
Removed SDWebImageQueryDataWhenInMemory
+
Removed SDWebImageQueryDiskSync
+
Removed -[SDWebImageManagerDelegate imageManager:transformDownloadedImage:withURL:]
+
Removed SDWebImageManager.imageDownloader
+
Removed -[SDWebImageManager initWithCache:downloader:]
+
Removed -[SDWebImageManager saveImageToCache:forURL:]
+
Removed -[SDWebImageManager cachedImageExistsForURL:completion:]
+
Removed -[SDWebImageManager diskImageExistsForURL:completion:]
+
+ + +
+
Added SDWebImageCombinedOperation
+
Added -[SDWebImageCombinedOperation cancel]
+
Added SDWebImageCombinedOperation.cacheOperation
+
Added SDWebImageCombinedOperation.loaderOperation
+
Added SDWebImageManager.imageLoader
+
Added SDWebImageManager.transformer
+
Added SDWebImageManager.defaultImageCache
+
Added SDWebImageManager.defaultImageLoader
+
Added -[SDWebImageManager initWithCache:loader:]
+
Added -[SDWebImageManager loadImageWithURL:options:context:progress:completed:]
+
+ + +
+
Modified -[SDWebImageManagerDelegate imageManager:shouldDownloadImageForURL:]
+ + + + +
Declaration
From- (BOOL)imageManager:(nonnull SDWebImageManager *)imageManager shouldDownloadImageForURL:(nullable NSURL *)imageURL
To- (BOOL)imageManager:(nonnull SDWebImageManager *)imageManager shouldDownloadImageForURL:(nonnull NSURL *)imageURL
+
+
Modified SDWebImageManager.imageCache
+ + + + +
Declaration
From@property (nonatomic, readonly, strong, nullable) SDImageCache *imageCache
To@property (nonatomic, readonly, strong, nonnull) id<SDImageCache> imageCache
+
+
Modified SDWebImageManager.cacheKeyFilter
+ + + + +
Declaration
From@property (nonatomic, copy, nullable) SDWebImageCacheKeyFilterBlock cacheKeyFilter
To@property (nonatomic, strong, nullable) id<SDWebImageCacheKeyFilter> cacheKeyFilter
+
+
Modified SDWebImageManager.cacheSerializer
+ + + + +
Declaration
From@property (nonatomic, copy, nullable) SDWebImageCacheSerializerBlock cacheSerializer
To@property (nonatomic, strong, nullable) id<SDWebImageCacheSerializer> cacheSerializer
+
+
Modified -[SDWebImageManager isRunning]
+ + + + +
Declaration
From- (BOOL)isRunning
To@property (nonatomic, readonly, assign, getter=isRunning) BOOL running
+
+
Modified +[SDWebImageManager sharedManager]
+ + + + +
Declaration
From+ (nonnull instancetype)sharedManager
To@property (class, nonatomic, readonly, nonnull) SDWebImageManager *sharedManager
+
+
Modified -[SDWebImageManager loadImageWithURL:options:progress:completed:]
+ + + + +
Declaration
From- (nullable id<SDWebImageOperation>)loadImageWithURL:(nullable NSURL *)url options:(SDWebImageOptions)options progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock completed:(nullable SDInternalCompletionBlock)completedBlock
To- (nullable SDWebImageCombinedOperation *)loadImageWithURL:(nullable NSURL *)url options:(SDWebImageOptions)options progress:(nullable SDImageLoaderProgressBlock)progressBlock completed:(nonnull SDInternalCompletionBlock)completedBlock
+
+
+ +
+ +
+
SDWebImageOperation.h
+ +
+
Added NSOperation (SDWebImageOperation)
+
+ +
+ +
+
SDWebImagePrefetcher.h
+ +
+
Removed SDWebImagePrefetcher.maxConcurrentDownloads
+
Removed SDWebImagePrefetcher.prefetcherQueue
+
+ + +
+
Added SDWebImagePrefetchToken
+
Added -[SDWebImagePrefetchToken cancel]
+
Added SDWebImagePrefetchToken.urls
+
Added SDWebImagePrefetcher.context
+
Added SDWebImagePrefetcher.delegateQueue
+
+ + +
+
Modified +[SDWebImagePrefetcher sharedImagePrefetcher]
+ + + + +
Declaration
From+ (nonnull instancetype)sharedImagePrefetcher
To@property (class, nonatomic, readonly, nonnull) SDWebImagePrefetcher *sharedImagePrefetcher
+
+
Modified -[SDWebImagePrefetcher prefetchURLs:]
+ + + + +
Declaration
From- (void)prefetchURLs:(nullable NSArray<NSURL *> *)urls
To- (nullable SDWebImagePrefetchToken *)prefetchURLs:(nullable NSArray<NSURL *> *)urls
+
+
Modified -[SDWebImagePrefetcher prefetchURLs:progress:completed:]
+ + + + +
Declaration
From- (void)prefetchURLs:(nullable NSArray<NSURL *> *)urls progress:(nullable SDWebImagePrefetcherProgressBlock)progressBlock completed:(nullable SDWebImagePrefetcherCompletionBlock)completionBlock
To- (nullable SDWebImagePrefetchToken *)prefetchURLs:(nullable NSArray<NSURL *> *)urls progress:(nullable SDWebImagePrefetcherProgressBlock)progressBlock completed:(nullable SDWebImagePrefetcherCompletionBlock)completionBlock
+
+
+ +
+ +
+
UIButton+WebCache.h
+ +
+
Added -[UIButton sd_setImageWithURL:forState:placeholderImage:options:context:]
+
Added -[UIButton sd_setImageWithURL:forState:placeholderImage:options:progress:completed:]
+
Added -[UIButton sd_setImageWithURL:forState:placeholderImage:options:context:progress:completed:]
+
Added -[UIButton sd_setBackgroundImageWithURL:forState:placeholderImage:options:context:]
+
Added -[UIButton sd_setBackgroundImageWithURL:forState:placeholderImage:options:progress:completed:]
+
Added -[UIButton sd_setBackgroundImageWithURL:forState:placeholderImage:options:context:progress:completed:]
+
+ + +
+
Modified -[UIButton sd_currentImageURL]
+ + + + +
Declaration
From- (nullable NSURL *)sd_currentImageURL
To@property (nonatomic, readonly, strong, nullable) NSURL *sd_currentImageURL
+
+
Modified -[UIButton sd_currentBackgroundImageURL]
+ + + + +
Declaration
From- (nullable NSURL *)sd_currentBackgroundImageURL
To@property (nonatomic, readonly, strong, nullable) NSURL *sd_currentBackgroundImageURL
+
+
+ +
+ +
+
UIImage+ForceDecode.h
+ +
+
Removed +[UIImage decodedImageWithImage:]
+
Removed +[UIImage decodedAndScaledDownImageWithImage:]
+
+ + +
+
Added UIImage.sd_isDecoded
+
Added +[UIImage sd_decodedImageWithImage:]
+
Added +[UIImage sd_decodedAndScaledDownImageWithImage:]
+
Added +[UIImage sd_decodedAndScaledDownImageWithImage:limitBytes:]
+
+ +
+ +
+
UIImage+GIF.h
+ +
+
Removed +[UIImage sd_animatedGIFWithData:]
+
Removed -[UIImage isGIF]
+
+ + +
+
Added +[UIImage sd_imageWithGIFData:]
+
+ +
+ +
+
UIImage+Metadata.h
+ +
+
Added UIImage (Metadata)
+
Added UIImage.sd_isAnimated
+
Added UIImage.sd_isIncremental
+
+ +
+ +
+
UIImage+MultiFormat.h
+ +
+
Added +[UIImage sd_imageWithData:scale:]
+
Added +[UIImage sd_imageWithData:scale:firstFrameOnly:]
+
Added -[UIImage sd_imageDataAsFormat:compressionQuality:]
+
Added -[UIImage sd_imageDataAsFormat:compressionQuality:firstFrameOnly:]
+
+ +
+ +
+
UIImage+Transform.h
+ +
+
Added SDImageScaleMode
+
Added SDImageScaleModeFill
+
Added SDImageScaleModeAspectFit
+
Added SDImageScaleModeAspectFill
+
Added SDRectCorner
+
Added UIImage (Transform)
+
Added -[UIImage sd_resizedImageWithSize:scaleMode:]
+
Added -[UIImage sd_croppedImageWithRect:]
+
Added -[UIImage sd_roundedCornerImageWithRadius:corners:borderWidth:borderColor:]
+
Added -[UIImage sd_rotatedImageWithAngle:fitSize:]
+
Added -[UIImage sd_flippedImageWithHorizontal:vertical:]
+
Added -[UIImage sd_tintedImageWithColor:]
+
Added -[UIImage sd_colorAtPoint:]
+
Added -[UIImage sd_colorsWithRect:]
+
Added -[UIImage sd_blurredImageWithRadius:]
+
Added -[UIImage sd_filteredImageWithFilter:]
+
+ +
+ +
+
UIImageView+HighlightedWebCache.h
+ +
+
Added -[UIImageView sd_setHighlightedImageWithURL:options:context:]
+
Added -[UIImageView sd_setHighlightedImageWithURL:options:context:progress:completed:]
+
+ + +
+
Modified -[UIImageView sd_setHighlightedImageWithURL:options:progress:completed:]
+ + + + +
Declaration
From- (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url options:(SDWebImageOptions)options progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock completed:(nullable SDExternalCompletionBlock)completedBlock
To- (void)sd_setHighlightedImageWithURL:(nullable NSURL *)url options:(SDWebImageOptions)options progress:(nullable SDImageLoaderProgressBlock)progressBlock completed:(nullable SDExternalCompletionBlock)completedBlock
+
+
+ +
+ +
+
UIImageView+WebCache.h
+ +
+
Removed -[UIImageView sd_setImageWithPreviousCachedImageWithURL:placeholderImage:options:progress:completed:]
+
+ + +
+
Added -[UIImageView sd_setImageWithURL:placeholderImage:options:context:]
+
Added -[UIImageView sd_setImageWithURL:placeholderImage:options:context:progress:completed:]
+
+ + +
+
Modified -[UIImageView sd_setImageWithURL:placeholderImage:options:progress:completed:]
+ + + + +
Declaration
From- (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock completed:(nullable SDExternalCompletionBlock)completedBlock
To- (void)sd_setImageWithURL:(nullable NSURL *)url placeholderImage:(nullable UIImage *)placeholder options:(SDWebImageOptions)options progress:(nullable SDImageLoaderProgressBlock)progressBlock completed:(nullable SDExternalCompletionBlock)completedBlock
+
+
+ +
+ +
+
UIView+WebCache.h
+ +
+
Removed SDWebImageInternalSetImageGroupKey
+
Removed SDWebImageExternalCustomManagerKey
+
Removed -[UIView sd_internalSetImageWithURL:placeholderImage:options:operationKey:setImageBlock:progress:completed:]
+
Removed -[UIView sd_internalSetImageWithURL:placeholderImage:options:operationKey:setImageBlock:progress:completed:context:]
+
Removed -[UIView sd_setShowActivityIndicatorView:]
+
Removed -[UIView sd_setIndicatorStyle:]
+
Removed -[UIView sd_showActivityIndicatorView]
+
Removed -[UIView sd_addActivityIndicator]
+
Removed -[UIView sd_removeActivityIndicator]
+
+ + +
+
Added -[UIView sd_internalSetImageWithURL:placeholderImage:options:context:setImageBlock:progress:completed:]
+
Added UIView.sd_imageIndicator
+
+ + +
+
Modified -[UIView sd_imageURL]
+ + + + +
Declaration
From- (nullable NSURL *)sd_imageURL
To@property (nonatomic, readonly, strong, nullable) NSURL *sd_imageURL
+
+
+ +
+ +
+
UIView+WebCacheOperation.h
+ +
+
Added -[UIView sd_imageLoadOperationForKey:]
+
+ +
+ + diff --git a/Docs/SDWebImage-5.0-Migration-guide.md b/Docs/SDWebImage-5.0-Migration-guide.md index 936e42e2..7253f5a4 100644 --- a/Docs/SDWebImage-5.0-Migration-guide.md +++ b/Docs/SDWebImage-5.0-Migration-guide.md @@ -10,51 +10,77 @@ This guide is provided in order to ease the transition of existing applications SDWebImage 5.0 officially supports iOS 8 and later, Mac OS X 10.10 and later, watchOS 2 and later and tvOS 9 and later. It needs Xcode 9 or later to be able to build everything properly. -For targeting previous versions of the SDKs, check [README - Backwards compatibility](https://github.com/rs/SDWebImage#backwards-compatibility) -. +For targeting previous versions of the SDKs, check [README - Backwards compatibility](https://github.com/rs/SDWebImage#backwards-compatibility). ### Migration -#### Swift +Using the view categories brings no change from 4.x to 5.0. -- TBD if needed - +Objective-C: -#### Objective-C +```objective-c +[imageView sd_setImageWithURL:url placeholderImage:placeholderImage]; +``` -- TBD if needed - +Swift: -### FLAnimatedImage support moved to a dedicated plugin repo -We are no longer hosting the integration with `FLAnimatedImage` inside this repo. We have a dedicated repo for that. -TBD +```swift +imageView.sd_setImage(with: url, placeholderImage: placeholder) +``` -### Entities +However, all view categories in 5.0 introduce a new extra arg called `SDWebImageContext`. Which can hold anything that previous enum `SDWebImageOptions` can not. This allow user to control advanced behavior for view loading as well as many aspect. See the declaration for `SDWebImageContext` for detailed information. + +### New Features + +#### Animated Image View + +In 5.0, we introduce a brand new animated image solution. Which including animated image loading, rendering, decoding, and also support customization for advanced user. + +This animated image solution is available for iOS/tvOS/macOS. The `SDAnimatedImage` is subclass of `UIImage/NSImage`, and `SDAnimatedImageView` is subclass of `UIImageView/NSImageView`, to allow most compatible for common framework APIs. See [Animated Image](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#animated-image-50) for more detailed information. + +#### Transformer + +In 5.0, we introduce a easy way to provide a image transform process after the image was downloaded from network. Which allow user to easily scale, rotate, rounded corner the original image. And even support chain a list of transformers together to output the final one. These transformed image will also stored to cache to avoid duplicate process. See [Image Transformer](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#transformer-50) for more detailed information. + +#### Customization + +In 5.0, we refactor our framework architecture, to allow it easy to customize for advanced user, without breaking anything or create their fork. We introduce [Custom Cache](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#custom-cache-50), [Custom Loader](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#custom-loader-50), and make current [Custom Coder](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#custom-coder-420) works better for these developers. + +#### FLAnimatedImage support moved to a dedicated plugin repo + +Since we introduce the new animated image solution. Now we are no longer hosting the integration with `FLAnimatedImage` inside this repo. But for user who need `FLAnimatedImage` support. We have a dedicated repo for that and contains all the code compatible for SDWebImage 5.0. See [SDWebImageFLPlugin](https://github.com/SDWebImage/SDWebImageFLPlugin) for more detailed information. + +#### Photos Plugin + +By taking the advantage of [Custom Loader](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#custom-loader-50) feature, we introduce a plugin to allow easily load Photos Library images. See [SDWebImagePhotosPlugin](https://github.com/SDWebImage/SDWebImagePhotosPlugin) for more detailed information. + + +### API Changes #### SDImageCache -- new initializer `initWithNamespace:diskCacheDirectory:config:`, is now the designated initializer - moved `maxMemoryCost` and `maxMemoryCountLimit` to `SDImageCacheConfig` -- added `SDImageCache diskImageDataExistsWithKey:` synchronous method +- `makeDiskCachePath:` removed, use `NSSearchPathForDirectoriesInDomains` with NSString's Path API instead. - `addReadOnlyCachePath:` removed, use `additionalCachePathBlock` instead - `cachePathForKey:inPath:` removed, use `cachePathForKey:` with NSString's path API instead. - `defaultCachePathForKey:` removed, use `cachePathForKey:` instead +- `SDCacheQueryCompletedBlock` renamed to `SDImageCacheQueryCompletionBlock` +- `SDWebImageCheckCacheCompletionBlock` renamed to `SDImageCacheCheckCompletionBlock` +- `SDWebImageCalculateSizeBlock` renamed to `SDImageCacheCalculateSizeBlock` #### SDImageCacheConfig -- added `diskCacheWritingOptions` of type `NSDataWritingOptions`, defaults to `NSDataWritingAtomic` -- added `maxMemoryCost` and `maxMemoryCountLimit` properties (used to be in `SDImageCache`) - `shouldDecompressImages` removed. Use `SDImageCacheAvoidDecodeImage` in cache options instead #### SDWebImageManager - `loadImageWithURL:options:progress:completed:` changed the `completed` param requirement from `nullable` to `nonnull` - `loadImageWithURL:options:progress:completed:` return type `id` changed to `SDWebImageCombinedOperation *` -- `shared()` changed to `shared` -- `isRunning()` changed to `isRunning` -- `imageCache` changed from nullable to nonnull -- `imageDownloader` renamed to `imageLoader` and changed from nullable to nonnull -- `cacheKeyFilter` property type changed to `id`, use the `SDWebImageCacheKeyFilter cacheKeyFilterWithBlock:` -- `cacheSerializer` property type CHANGED to `id`, use the `SDWebImageCacheSerializer cacheSerializerWithBlock:` -- `imageCache` property type changed from `SDImageCache *` to `id`. The default value does not change. +- `imageCache` changed from nullable to nonnull. And property type changed from `SDImageCache *` to `id`. The default value does not change. +- `imageDownloader` renamed to `imageLoader` and changed from nullable to nonnull. And property type changed from `SDWebImageDownloader *` to `id`. The default value does not change. +- `cacheKeyFilter` property type changed to `id`, you can use `+[SDWebImageCacheKeyFilter cacheKeyFilterWithBlock:]` to create +- `cacheSerializer` property type changed to `id`, you can use `+[SDWebImageCacheSerializer cacheSerializerWithBlock:]` to create +- `SDWebImageCacheKeyFilterBlock`'s `url` arg change from nullable to nonnull - `initWithCache:downloader:` 's `cache` arg type changed from `SDImageCache *` to `id` - `initWithCache:downloader` renamed to `initWithCache:loader:` - `saveImageToCache:forURL:` removed. Use `SDImageCache storeImage:imageData:forKey:cacheType:completion:` (or `SDImageCache storeImage:forKey:toDisk:completion:` if you use default cache class) with `cacheKeyForURL:` instead. @@ -63,25 +89,26 @@ TBD #### SDWebImageManagerDelegate -- removed `imageManager:transformDownloadedImage:forKey:` +- removed `imageManager:transformDownloadedImage:forKey:`, use `SDImageTransformer` with context option instead #### UIView and subclasses (UIImageView, UIButton, ...) - `sd_internalSetImageWithURL:placeholderImage:options:operationKey:setImageBlock:progress:completed:` renamed to `UIView sd_internalSetImageWithURL:placeholderImage:options:context:setImageBlock:progress:completed:` (The biggest changes is that the completion block type from `SDExternalCompletionBlock` to `SDInternalCompletionBlock`. Which allow advanced user to get more information of image loading process) - `sd_internalSetImageWithURL:placeholderImage:options:operationKey:setImageBlock:progress:completed:context:` removed - activity indicator refactoring - use `sd_imageIndicator` with `SDWebImageActivityIndicator` - - `sd_setShowActivityIndicatorView:` removed - - `sd_setIndicatorStyle:` removed - - `sd_showActivityIndicatorView` removed - - `sd_addActivityIndicator:` removed - - `sd_removeActivityIndicator:` removed +- `sd_setShowActivityIndicatorView:` removed +- `sd_setIndicatorStyle:` removed +- `sd_showActivityIndicatorView` removed +- `sd_addActivityIndicator:` removed +- `sd_removeActivityIndicator:` removed #### UIImage - Renamed `isGIF` to `sd_isAnimated`, also `NSImage isGIF` renamed to `NSImage sd_isAnimated` - Renamed `decodedImageWithImage:` to `sd_decodedImageWithImage:` - Renamed `decodedAndScaledDownImageWithImage:` to `sd_decodedAndScaledDownImageWithImage:` -- Removed `sd_webpLoopCount` since we have `sd_imageLoopCount` +- Renamed `sd_animatedGIFWithData` to `sd_imageWithGIFData:` +- Removed `sd_webpLoopCount` #### UIImageView @@ -89,9 +116,6 @@ TBD #### SDWebImageDownloader -- `shared()` changed to `shared` -- `setOperationClass` available for Swift user -- `setSuspended(_:)` changed to `isSuspended` property - `shouldDecompressImages` moved to `SDWebImageDownloaderConfig.shouldDecompressImages` - `maxConcurrentDownloads` moved to `SDWebImageDownloaderConfig.maxConcurrentDownloads` - `downloadTimeout` moved to `SDWebImageDownloaderConfig.downloadTimeout` @@ -100,10 +124,10 @@ TBD - `urlCredential` moved to `SDWebImageDownloaderConfig.urlCredential` - `username` moved to `SDWebImageDownloaderConfig.username` - `password` moved to `SDWebImageDownloaderConfig.password` -- `initWithSessionConfiguration:` removed, use `initWithConfig:]` with session configuration instead -- `createNewSessionWithConfiguration:` removed, use `initWithConfig:]` with new session configuration instead. To modify shared downloader configuration, provide custom `SDWebImageDownloaderConfig.defaultDownloaderConfig` before it created. +- `initWithSessionConfiguration:` removed, use `initWithConfig:` with session configuration instead +- `createNewSessionWithConfiguration:` removed, use `initWithConfig:` with new session configuration instead. To modify shared downloader configuration, provide custom `SDWebImageDownloaderConfig.defaultDownloaderConfig` before it created. - `headersFilter` removed, use `requestModifier` instead -- `cancel:` removed, use `SDWebImageDownloadToken cancel` instead +- `cancel:` removed, use `-[SDWebImageDownloadToken cancel]` instead - `shouldDecompressImages` removed. Use `SDWebImageDownloaderAvoidDecodeImage` in downloader options instead - use `SDWebImageLoaderProgressBlock` instead of `SDWebImageDownloaderProgressBlock` - use `SDWebImageLoaderCompletedBlock` instead of `SDWebImageDownloaderCompletedBlock` @@ -112,9 +136,10 @@ TBD - `initWithRequest:inSession:options:context:` is now the designated initializer - Removed `shouldUseCredentialStorage` property -- `SDWebImageDownloadOperationInterface` protocol renamed to `SDWebImageDownloadOperation`. (`SDWebImageDownloadOperationProtocol` for Swift) +- `SDWebImageDownloadOperationInterface` protocol renamed to `SDWebImageDownloadOperation` - `expectedSize` removed, use `response.expectedContentLength` instead - `shouldDecompressImages` removed. Use `SDWebImageDownloaderAvoidDecodeImage` in downloader options instead. +- `response` property change to readonly #### SDWebImagePrefetcher @@ -123,13 +148,36 @@ TBD - `maxConcurrentDownloads` property removed, use `SDWebImageManager.downloader` config instead #### SDImageCoder -- `SDCGColorSpaceGetDeviceRGB()` moved to `SDImageCoderHelper colorSpaceGetDeviceRGB` -- `SDCGImageRefContainsAlpha()`, moved to `SDImageCoderHelper imageRefContainsAlpha:` +- `SDCGColorSpaceGetDeviceRGB()` moved to `+[SDImageCoderHelper colorSpaceGetDeviceRGB]` +- `SDCGImageRefContainsAlpha()`, moved to `+[SDImageCoderHelper imageRefContainsAlpha:]` - `decodedImageWithData:` replaced with `decodedImageWithData:options:` - `encodedDataWithImage:format:` replaced with `encodedDataWithImage:format:options` - `init` method from `SDWebImageProgressiveCoder` changed to `initIncrementalWithOptions:` -- `incrementalDecodedImageWithData:finished` replaced with `updateIncrementalData:finished` and `incrementalDecodedImageWithOptions:` -- removed `decompressedImage:data:options` +- `incrementalDecodedImageWithData:finished` replaced with `updateIncrementalData:finished` and `incrementalDecodedImageWithOptions:` two APIs +- removed `decompressedImage:data:options`, use `+[SDImageCoderHelper decodedImageWithImage:]` and `+[SDImageCoderHelper decodedAndScaledDownImageWithImage:limitBytes:]` instead + +#### Constants + +- `SDWebImageInternalSetImageGroupKey` renamed to `SDWebImageContextSetImageGroup` +- `SDWebImageExternalCustomManagerKey` renamed to `SDWebImageContextCustomManager` + +### Swift Specific API Changes +We did a full cleanup of the Swift APIs. We are using many modern Objective-C declarations to generate the Swift API. We now provide full nullability support, string enum, class property, and even custom Swift API name, all to make the framework easier to use for our Swift users. Here are the API change specify for Swift. + +#### UIView+WebCache +- `sd_imageURL()` changed to `sd_imageURL` + +#### SDWebImageManager +- `shared()` changed to `shared` +- `isRunning()` changed to `isRunning` + +#### SDWebImageDownloader +- `shared()` changed to `shared` +- `setOperationClass(_:)` available for Swift user with `operationClass` property +- `setSuspended(_:)` changed to `isSuspended` property + +#### SDWebImageDownloadOperation +- `SDWebImageDownloadOperationInterface` protocol renamed to `SDWebImageDownloadOperationProtocol`. #### SDImageCodersManager @@ -154,13 +202,12 @@ TBD #### UIButton-WebCache - `sd_currentImageURL()` changed to `sd_currentImageURL` - + #### NSButton-WebCache - `sd_currentImageURL()` changed to `sd_currentImageURL` - `sd_currentAlternateImageURL()` changed to `sd_currentAlternateImageURL` -#### Constants +### Full API Diff +For advanced user who need the detailed API diff, we provide the full diff in a HTML web page: [SDWebImage 5.0 API Diff](API-Diff/5.0/apidiff.html) -- `SDWebImageInternalSetImageGroupKey` renamed to `SDWebImageContextSetImageGroup` -- `SDWebImageExternalCustomManagerKey` renamed to `SDWebImageContextCustomManager` From 2299d9ab6ab7ac9bf7c40c6c06f389e0b2e8dfac Mon Sep 17 00:00:00 2001 From: Bogdan Poplauschi Date: Mon, 16 Jul 2018 10:13:19 +0300 Subject: [PATCH 4/5] Another update per @dreampiggy --- Docs/SDWebImage-5.0-Migration-guide.md | 52 ++++++++++++++------------ 1 file changed, 29 insertions(+), 23 deletions(-) diff --git a/Docs/SDWebImage-5.0-Migration-guide.md b/Docs/SDWebImage-5.0-Migration-guide.md index 7253f5a4..9fe221fd 100644 --- a/Docs/SDWebImage-5.0-Migration-guide.md +++ b/Docs/SDWebImage-5.0-Migration-guide.md @@ -28,9 +28,9 @@ Swift: imageView.sd_setImage(with: url, placeholderImage: placeholder) ``` -However, all view categories in 5.0 introduce a new extra arg called `SDWebImageContext`. Which can hold anything that previous enum `SDWebImageOptions` can not. This allow user to control advanced behavior for view loading as well as many aspect. See the declaration for `SDWebImageContext` for detailed information. +However, all view categories in 5.0 introduce a new extra arg called `SDWebImageContext`. Which can hold anything that previous enum `SDWebImageOptions` can not. This allow user to control advanced behavior for image loading as well as many aspect (cache, loader, etc). See the declaration for `SDWebImageContext` for detailed information. -### New Features +### New Feature #### Animated Image View @@ -44,7 +44,10 @@ In 5.0, we introduce a easy way to provide a image transform process after the i #### Customization -In 5.0, we refactor our framework architecture, to allow it easy to customize for advanced user, without breaking anything or create their fork. We introduce [Custom Cache](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#custom-cache-50), [Custom Loader](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#custom-loader-50), and make current [Custom Coder](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#custom-coder-420) works better for these developers. +In 5.0, we refactor our framework architecture with many aspect. This make our framework easier to customize for advanced user, without hook anything or create their fork. We introduce [Custom Cache](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#custom-cache-50) to control detailed cache loading behavior, and separate the memory cache & disk cache implementation. We introduce [Custom Loader](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#custom-loader-50) to allow custom loading from your own source (which even not need to be on network). And also, we change current [Custom Coder](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#custom-coder-420) to works better for custom image decoder/encoder and animated image. + +#### View Indicator +In 5.0, we refactor the current image loading indicator API. To use a better and extensible API for both iOS/tvOS/macOS. Which is suitable for easy usage for provide a loading view during the image loading process. See [View Indicator](https://github.com/rs/SDWebImage/wiki/How-to-use#use-view-indicator-50) for more detailed information. #### FLAnimatedImage support moved to a dedicated plugin repo @@ -96,11 +99,11 @@ By taking the advantage of [Custom Loader](https://github.com/rs/SDWebImage/wiki - `sd_internalSetImageWithURL:placeholderImage:options:operationKey:setImageBlock:progress:completed:` renamed to `UIView sd_internalSetImageWithURL:placeholderImage:options:context:setImageBlock:progress:completed:` (The biggest changes is that the completion block type from `SDExternalCompletionBlock` to `SDInternalCompletionBlock`. Which allow advanced user to get more information of image loading process) - `sd_internalSetImageWithURL:placeholderImage:options:operationKey:setImageBlock:progress:completed:context:` removed - activity indicator refactoring - use `sd_imageIndicator` with `SDWebImageActivityIndicator` -- `sd_setShowActivityIndicatorView:` removed -- `sd_setIndicatorStyle:` removed -- `sd_showActivityIndicatorView` removed -- `sd_addActivityIndicator:` removed -- `sd_removeActivityIndicator:` removed + - `sd_setShowActivityIndicatorView:` removed + - `sd_setIndicatorStyle:` removed + - `sd_showActivityIndicatorView` removed + - `sd_addActivityIndicator:` removed + - `sd_removeActivityIndicator:` removed #### UIImage @@ -161,53 +164,56 @@ By taking the advantage of [Custom Loader](https://github.com/rs/SDWebImage/wiki - `SDWebImageInternalSetImageGroupKey` renamed to `SDWebImageContextSetImageGroup` - `SDWebImageExternalCustomManagerKey` renamed to `SDWebImageContextCustomManager` -### Swift Specific API Changes -We did a full cleanup of the Swift APIs. We are using many modern Objective-C declarations to generate the Swift API. We now provide full nullability support, string enum, class property, and even custom Swift API name, all to make the framework easier to use for our Swift users. Here are the API change specify for Swift. +#### Swift Specific API Change +In SDWebImage 5.0 we did a clean up of the API. We are using many modern Objective-C declarations to generate the Swift API. We now provide full nullability support, string enum, class property, and even custom Swift API name, all to make the framework easier to use for our Swift users. Here are the API change specify for Swift. -#### UIView+WebCache +##### UIView+WebCache - `sd_imageURL()` changed to `sd_imageURL` -#### SDWebImageManager +##### SDImageCache +- `shared()` changed to `shared` + +##### SDWebImageManager - `shared()` changed to `shared` - `isRunning()` changed to `isRunning` -#### SDWebImageDownloader +##### SDWebImageDownloader - `shared()` changed to `shared` - `setOperationClass(_:)` available for Swift user with `operationClass` property - `setSuspended(_:)` changed to `isSuspended` property -#### SDWebImageDownloadOperation +##### SDWebImageDownloadOperation - `SDWebImageDownloadOperationInterface` protocol renamed to `SDWebImageDownloadOperationProtocol`. -#### SDImageCodersManager +##### SDImageCodersManager - `sharedInstance()` changed to `shared` -#### SDImageIOCoder +##### SDImageIOCoder - `shared()` changed to `shared` -#### SDImageGIFCoder +##### SDImageGIFCoder - `shared()` changed to `shared` -#### SDImageWebPCoder +##### SDImageWebPCoder - `shared()` changed to `shared` -#### NSData-ImageContentType +##### NSData-ImageContentType - `sd_UTTypeFromSDImageFormat` return `CFString` instead of `Unmanaged` -#### UIButton-WebCache +##### UIButton-WebCache - `sd_currentImageURL()` changed to `sd_currentImageURL` - -#### NSButton-WebCache + +##### NSButton-WebCache - `sd_currentImageURL()` changed to `sd_currentImageURL` - `sd_currentAlternateImageURL()` changed to `sd_currentAlternateImageURL` ### Full API Diff -For advanced user who need the detailed API diff, we provide the full diff in a HTML web page: [SDWebImage 5.0 API Diff](API-Diff/5.0/apidiff.html) +For advanced user who need the detailed API diff, we provide the full diff in a HTML web page: [SDWebImage 5.0 API Diff](https://raw.githubusercontent.com/rs/SDWebImage/master/Docs/Diff/5.0/apidiff.html) From a42577ce5d82b6a07644b56b141f797661979b10 Mon Sep 17 00:00:00 2001 From: Bogdan Poplauschi Date: Mon, 16 Jul 2018 10:31:52 +0300 Subject: [PATCH 5/5] Trying to make some descriptions more clear --- Docs/SDWebImage-5.0-Migration-guide.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Docs/SDWebImage-5.0-Migration-guide.md b/Docs/SDWebImage-5.0-Migration-guide.md index 9fe221fd..cac95da0 100644 --- a/Docs/SDWebImage-5.0-Migration-guide.md +++ b/Docs/SDWebImage-5.0-Migration-guide.md @@ -28,34 +28,34 @@ Swift: imageView.sd_setImage(with: url, placeholderImage: placeholder) ``` -However, all view categories in 5.0 introduce a new extra arg called `SDWebImageContext`. Which can hold anything that previous enum `SDWebImageOptions` can not. This allow user to control advanced behavior for image loading as well as many aspect (cache, loader, etc). See the declaration for `SDWebImageContext` for detailed information. +However, all view categories in 5.0 introduce a new extra arg called `SDWebImageContext`. This param can hold anything, as oposed to the previous `SDWebImageOptions` enum limitations. This gives developers advanced control for the behavior of image loading (cache, loader, etc). See the declaration for `SDWebImageContext` for detailed information. ### New Feature #### Animated Image View -In 5.0, we introduce a brand new animated image solution. Which including animated image loading, rendering, decoding, and also support customization for advanced user. +In 5.0, we introduced a brand new mechanism for supporting animated images. This includes animated image loading, rendering, decoding, and also supports customizations (for advanced users). -This animated image solution is available for iOS/tvOS/macOS. The `SDAnimatedImage` is subclass of `UIImage/NSImage`, and `SDAnimatedImageView` is subclass of `UIImageView/NSImageView`, to allow most compatible for common framework APIs. See [Animated Image](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#animated-image-50) for more detailed information. +This animated image solution is available for `iOS`/`tvOS`/`macOS`. The `SDAnimatedImage` is subclass of `UIImage/NSImage`, and `SDAnimatedImageView` is subclass of `UIImageView/NSImageView`, to make them compatible with the common frameworks APIs. See [Animated Image](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#animated-image-50) for more detailed information. #### Transformer -In 5.0, we introduce a easy way to provide a image transform process after the image was downloaded from network. Which allow user to easily scale, rotate, rounded corner the original image. And even support chain a list of transformers together to output the final one. These transformed image will also stored to cache to avoid duplicate process. See [Image Transformer](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#transformer-50) for more detailed information. +In 5.0, we introduced an easy way to hook an image transformation process after the image was downloaded from network. This allows the user to easily scale, rotate, add rounded corner the original image and even chain a list of transformations. These transformed images will also be stored to the cache as they are after transformation. The reasons for this decision are: avoiding redoing the transformations (which can lead to unwanted behavior) and also time saving. See [Image Transformer](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#transformer-50) for more detailed information. #### Customization -In 5.0, we refactor our framework architecture with many aspect. This make our framework easier to customize for advanced user, without hook anything or create their fork. We introduce [Custom Cache](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#custom-cache-50) to control detailed cache loading behavior, and separate the memory cache & disk cache implementation. We introduce [Custom Loader](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#custom-loader-50) to allow custom loading from your own source (which even not need to be on network). And also, we change current [Custom Coder](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#custom-coder-420) to works better for custom image decoder/encoder and animated image. +In 5.0, we refactored our framework architecture in many aspects. This makes our framework easier to customize for advanced users, without the need for hooking anything or forking. We introduced [Custom Cache](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#custom-cache-50) to control detailed cache loading behavior, and separate the memory cache & disk cache implementation. We introduced [Custom Loader](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#custom-loader-50) to allow custom loading from your own source (doesn't have to be the network). And also, we changed the current [Custom Coder](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#custom-coder-420) to work better for custom image decoder/encoder and animated images. #### View Indicator -In 5.0, we refactor the current image loading indicator API. To use a better and extensible API for both iOS/tvOS/macOS. Which is suitable for easy usage for provide a loading view during the image loading process. See [View Indicator](https://github.com/rs/SDWebImage/wiki/How-to-use#use-view-indicator-50) for more detailed information. +In 5.0, we refactored the image loading indicator API into a better and extensible API for `iOS`/`tvOS`/`macOS`. This is suitable for easy usage like providing a loading view during the image loading process. See [View Indicator](https://github.com/rs/SDWebImage/wiki/How-to-use#use-view-indicator-50) for more detailed information. #### FLAnimatedImage support moved to a dedicated plugin repo -Since we introduce the new animated image solution. Now we are no longer hosting the integration with `FLAnimatedImage` inside this repo. But for user who need `FLAnimatedImage` support. We have a dedicated repo for that and contains all the code compatible for SDWebImage 5.0. See [SDWebImageFLPlugin](https://github.com/SDWebImage/SDWebImageFLPlugin) for more detailed information. +In order to clean up things and make our core project do less things, we decided that the `FLAnimatedImage` integration does not belong here. From 5.0, this will still be available, but under a dedicated repo [SDWebImageFLPlugin](https://github.com/SDWebImage/SDWebImageFLPlugin). #### Photos Plugin -By taking the advantage of [Custom Loader](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#custom-loader-50) feature, we introduce a plugin to allow easily load Photos Library images. See [SDWebImagePhotosPlugin](https://github.com/SDWebImage/SDWebImagePhotosPlugin) for more detailed information. +By taking the advantage of the [Custom Loader](https://github.com/rs/SDWebImage/wiki/Advanced-Usage#custom-loader-50) feature, we introduced a plugin to allow easy loading images from the Photos Library. See [SDWebImagePhotosPlugin](https://github.com/SDWebImage/SDWebImagePhotosPlugin) for more detailed information. ### API Changes