Update the Readme, migration guide and API-diff to the latest version
This commit is contained in:
parent
3f29a3ef1e
commit
319322fbd5
|
@ -1,4 +1,4 @@
|
||||||
## [5.0.0 Major release - Customizable SDWebImage, on Mar 31th, 2019](https://github.com/rs/SDWebImage/releases/tag/5.0.0)
|
## [5.0.0 Major release - Customizable SDWebImage, on Apr 2nd, 2019](https://github.com/rs/SDWebImage/releases/tag/5.0.0)
|
||||||
See [all tickets marked for the 5.0.0 release](https://github.com/SDWebImage/SDWebImage/milestone/15)
|
See [all tickets marked for the 5.0.0 release](https://github.com/SDWebImage/SDWebImage/milestone/15)
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
|
@ -517,6 +517,7 @@
|
||||||
<div class="difference"><span class="status added">Added</span> SDImageLoader</div>
|
<div class="difference"><span class="status added">Added</span> SDImageLoader</div>
|
||||||
<div class="difference"><span class="status added">Added</span> -[SDImageLoader canRequestImageForURL:]</div>
|
<div class="difference"><span class="status added">Added</span> -[SDImageLoader canRequestImageForURL:]</div>
|
||||||
<div class="difference"><span class="status added">Added</span> -[SDImageLoader requestImageWithURL:options:context:progress:completed:]</div>
|
<div class="difference"><span class="status added">Added</span> -[SDImageLoader requestImageWithURL:options:context:progress:completed:]</div>
|
||||||
|
<div class="difference"><span class="status added">Added</span> -[SDImageLoader shouldBlockFailedURLWithURL:error:]</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -770,6 +771,34 @@
|
||||||
|
|
||||||
|
|
||||||
<div class="differenceGroup">
|
<div class="differenceGroup">
|
||||||
|
<div class="difference"><span class="status modified">Modified</span> SDWebImageDownloadStartNotification</div>
|
||||||
|
<table>
|
||||||
|
<tr><th></th><th>Declaration</th></tr>
|
||||||
|
<tr><th>From</th><td class="declaration">NSString *const _Nonnull SDWebImageDownloadStartNotification</td></tr>
|
||||||
|
<tr><th>To</th><td class="declaration">NSNotificationName _Nonnull const SDWebImageDownloadStartNotification</td></tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<div class="difference"><span class="status modified">Modified</span> SDWebImageDownloadReceiveResponseNotification</div>
|
||||||
|
<table>
|
||||||
|
<tr><th></th><th>Declaration</th></tr>
|
||||||
|
<tr><th>From</th><td class="declaration">NSString *const _Nonnull SDWebImageDownloadReceiveResponseNotification</td></tr>
|
||||||
|
<tr><th>To</th><td class="declaration">NSNotificationName _Nonnull const SDWebImageDownloadReceiveResponseNotification</td></tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<div class="difference"><span class="status modified">Modified</span> SDWebImageDownloadStopNotification</div>
|
||||||
|
<table>
|
||||||
|
<tr><th></th><th>Declaration</th></tr>
|
||||||
|
<tr><th>From</th><td class="declaration">NSString *const _Nonnull SDWebImageDownloadStopNotification</td></tr>
|
||||||
|
<tr><th>To</th><td class="declaration">NSNotificationName _Nonnull const SDWebImageDownloadStopNotification</td></tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
|
<div class="difference"><span class="status modified">Modified</span> SDWebImageDownloadFinishNotification</div>
|
||||||
|
<table>
|
||||||
|
<tr><th></th><th>Declaration</th></tr>
|
||||||
|
<tr><th>From</th><td class="declaration">NSString *const _Nonnull SDWebImageDownloadFinishNotification</td></tr>
|
||||||
|
<tr><th>To</th><td class="declaration">NSNotificationName _Nonnull const SDWebImageDownloadFinishNotification</td></tr>
|
||||||
|
</table>
|
||||||
|
<br>
|
||||||
<div class="difference"><span class="status modified">Modified</span> SDWebImageDownloaderProgressBlock</div>
|
<div class="difference"><span class="status modified">Modified</span> SDWebImageDownloaderProgressBlock</div>
|
||||||
<table>
|
<table>
|
||||||
<tr><th></th><th>Declaration</th></tr>
|
<tr><th></th><th>Declaration</th></tr>
|
||||||
|
|
|
@ -108,6 +108,15 @@ prefetcher.cancelPrefetching()
|
||||||
prefetcher.prefetchURLs([url1, url2])
|
prefetcher.prefetchURLs([url1, url2])
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Error codes and domain
|
||||||
|
For image loading from network, if you don't pass `SDWebImageRetryFailed` option, we'll try to blocking some URLs which is indeed mark as failed.
|
||||||
|
|
||||||
|
This check is done previously in a hard-coded logic for specify error codes. However, due to some compatible issue, we don't check the error domain. (Learn about [NSError's domain and codes](https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ErrorHandlingCocoa/ErrorObjectsDomains/ErrorObjectsDomains.html)) And arbitrarily block some codes which may from custom download operation implementations.
|
||||||
|
|
||||||
|
Since in 5.x, we supports custom loaders which can use any third-party SDKs, and have their own error domain and error codes. So we now only filter the error codes in [NSURLErrorDomain](https://developer.apple.com/documentation/foundation/nsurlerrordomain). If you have already using some error codes without error domain check, or you use [Custom Download Operation](https://github.com/SDWebImage/SDWebImage/wiki/Advanced-Usage#custom-download-operation-40), be sure to update it with the right way.
|
||||||
|
|
||||||
|
At the same time, our framework errors, now using the formal `SDWebImageErrorDomain` with the pre-defined codes. Check `SDWebImageError.h` for details.
|
||||||
|
|
||||||
### API Changes
|
### API Changes
|
||||||
|
|
||||||
#### SDImageCache
|
#### SDImageCache
|
||||||
|
|
17
README.md
17
README.md
|
@ -42,9 +42,10 @@ As such, we have moved/built new modules to [SDWebImage org](https://github.com/
|
||||||
|
|
||||||
#### Coders for additional image formats
|
#### Coders for additional image formats
|
||||||
- [SDWebImageWebPCoder](https://github.com/SDWebImage/SDWebImageWebPCoder) - coder for WebP image format. Based on [libwebp](https://chromium.googlesource.com/webm/libwebp)
|
- [SDWebImageWebPCoder](https://github.com/SDWebImage/SDWebImageWebPCoder) - coder for WebP image format. Based on [libwebp](https://chromium.googlesource.com/webm/libwebp)
|
||||||
- [SDWebImageHEIFCoder](https://github.com/SDWebImage/SDWebImageHEIFCoder) - coder to support HEIF image without Apple's `Image/IO framework`
|
- [SDWebImageHEIFCoder](https://github.com/SDWebImage/SDWebImageHEIFCoder) - coder to support HEIF image without Apple's `Image/IO framework`, iOS 8+/macOS 10.10+ support.
|
||||||
- [SDWebImageAPNGCoder](https://github.com/SDWebImage/SDWebImageAPNGCoder) - coder for APNG format (animated PNG)
|
|
||||||
- [SDWebImageBPGCoder](https://github.com/SDWebImage/SDWebImageBPGCoder) - coder for BPG format
|
- [SDWebImageBPGCoder](https://github.com/SDWebImage/SDWebImageBPGCoder) - coder for BPG format
|
||||||
|
- [SDWebImageFLIFCoder](https://github.com/SDWebImage/SDWebImageFLIFCoder) - coder for FLIF format
|
||||||
|
- and more from community!
|
||||||
|
|
||||||
#### Loaders
|
#### Loaders
|
||||||
- [SDWebImagePhotosPlugin](https://github.com/SDWebImage/SDWebImagePhotosPlugin) - plugin to support loading images from Photos (using `Photos.framework`)
|
- [SDWebImagePhotosPlugin](https://github.com/SDWebImage/SDWebImagePhotosPlugin) - plugin to support loading images from Photos (using `Photos.framework`)
|
||||||
|
@ -59,12 +60,6 @@ As such, we have moved/built new modules to [SDWebImage org](https://github.com/
|
||||||
|
|
||||||
You can use those directly, or create similar components of your own.
|
You can use those directly, or create similar components of your own.
|
||||||
|
|
||||||
## Beta version
|
|
||||||
|
|
||||||
SDWebImage's 5.0 version is nearing completion. Which introduce many new features like Animated ImageView and Transformer. We also provide a more modularized design used for advanced user customization.
|
|
||||||
|
|
||||||
You can check the latest [5.x branch](https://github.com/SDWebImage/SDWebImage/tree/5.x) to know about the current status. We'd love you to have a try with the beta version and provide any feedback. If you'd love, check [SDWebImage 5.0 Migration Guide](https://github.com/SDWebImage/SDWebImage/wiki/5.0-Migration-guide) and prepare for the migration.
|
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- iOS 8.0 or later
|
- iOS 8.0 or later
|
||||||
|
@ -108,7 +103,7 @@ You can check the latest [5.x branch](https://github.com/SDWebImage/SDWebImage/t
|
||||||
* Objective-C
|
* Objective-C
|
||||||
|
|
||||||
```objective-c
|
```objective-c
|
||||||
#import <SDWebImage/UIImageView+WebCache.h>
|
#import <SDWebImage/SDWebImage.h>
|
||||||
...
|
...
|
||||||
[imageView sd_setImageWithURL:[NSURL URLWithString:@"http://www.domain.com/path/to/image.jpg"]
|
[imageView sd_setImageWithURL:[NSURL URLWithString:@"http://www.domain.com/path/to/image.jpg"]
|
||||||
placeholderImage:[UIImage imageNamed:@"placeholder.png"]];
|
placeholderImage:[UIImage imageNamed:@"placeholder.png"]];
|
||||||
|
@ -200,10 +195,10 @@ If this is your first time using Carthage in the project, you'll need to go thro
|
||||||
|
|
||||||
### Import headers in your source files
|
### Import headers in your source files
|
||||||
|
|
||||||
In the source files where you need to use the library, import the header file:
|
In the source files where you need to use the library, import the umbrella header file:
|
||||||
|
|
||||||
```objective-c
|
```objective-c
|
||||||
#import <SDWebImage/UIImageView+WebCache.h>
|
#import <SDWebImage/SDWebImage.h>
|
||||||
```
|
```
|
||||||
|
|
||||||
### Build Project
|
### Build Project
|
||||||
|
|
|
@ -59,10 +59,8 @@
|
||||||
325312D0200F09910046BF1E /* SDWebImageTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 325312C7200F09910046BF1E /* SDWebImageTransition.m */; };
|
325312D0200F09910046BF1E /* SDWebImageTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 325312C7200F09910046BF1E /* SDWebImageTransition.m */; };
|
||||||
3257EAF921898AED0097B271 /* SDImageGraphics.h in Headers */ = {isa = PBXBuildFile; fileRef = 3257EAF721898AED0097B271 /* SDImageGraphics.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
3257EAF921898AED0097B271 /* SDImageGraphics.h in Headers */ = {isa = PBXBuildFile; fileRef = 3257EAF721898AED0097B271 /* SDImageGraphics.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
3257EAFA21898AED0097B271 /* SDImageGraphics.h in Headers */ = {isa = PBXBuildFile; fileRef = 3257EAF721898AED0097B271 /* SDImageGraphics.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
3257EAFA21898AED0097B271 /* SDImageGraphics.h in Headers */ = {isa = PBXBuildFile; fileRef = 3257EAF721898AED0097B271 /* SDImageGraphics.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
3257EAFB21898AED0097B271 /* SDImageGraphics.h in Headers */ = {isa = PBXBuildFile; fileRef = 3257EAF721898AED0097B271 /* SDImageGraphics.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
|
||||||
3257EAFC21898AED0097B271 /* SDImageGraphics.m in Sources */ = {isa = PBXBuildFile; fileRef = 3257EAF821898AED0097B271 /* SDImageGraphics.m */; };
|
3257EAFC21898AED0097B271 /* SDImageGraphics.m in Sources */ = {isa = PBXBuildFile; fileRef = 3257EAF821898AED0097B271 /* SDImageGraphics.m */; };
|
||||||
3257EAFD21898AED0097B271 /* SDImageGraphics.m in Sources */ = {isa = PBXBuildFile; fileRef = 3257EAF821898AED0097B271 /* SDImageGraphics.m */; };
|
3257EAFD21898AED0097B271 /* SDImageGraphics.m in Sources */ = {isa = PBXBuildFile; fileRef = 3257EAF821898AED0097B271 /* SDImageGraphics.m */; };
|
||||||
3257EAFE21898AED0097B271 /* SDImageGraphics.m in Sources */ = {isa = PBXBuildFile; fileRef = 3257EAF821898AED0097B271 /* SDImageGraphics.m */; };
|
|
||||||
325C460222339330004CAE11 /* SDImageAssetManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 325C460022339330004CAE11 /* SDImageAssetManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
325C460222339330004CAE11 /* SDImageAssetManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 325C460022339330004CAE11 /* SDImageAssetManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||||
325C460322339330004CAE11 /* SDImageAssetManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 325C460022339330004CAE11 /* SDImageAssetManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
325C460322339330004CAE11 /* SDImageAssetManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 325C460022339330004CAE11 /* SDImageAssetManager.h */; settings = {ATTRIBUTES = (Private, ); }; };
|
||||||
325C460422339330004CAE11 /* SDImageAssetManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 325C460122339330004CAE11 /* SDImageAssetManager.m */; };
|
325C460422339330004CAE11 /* SDImageAssetManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 325C460122339330004CAE11 /* SDImageAssetManager.m */; };
|
||||||
|
@ -843,7 +841,6 @@
|
||||||
isa = PBXHeadersBuildPhase;
|
isa = PBXHeadersBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
3257EAFB21898AED0097B271 /* SDImageGraphics.h in Headers */,
|
|
||||||
806BE07E2142C65200E02143 /* SDWebImageMapKit.h in Headers */,
|
806BE07E2142C65200E02143 /* SDWebImageMapKit.h in Headers */,
|
||||||
80B6DFCD2142B71600BCB334 /* MKAnnotationView+WebCache.h in Headers */,
|
80B6DFCD2142B71600BCB334 /* MKAnnotationView+WebCache.h in Headers */,
|
||||||
);
|
);
|
||||||
|
@ -1105,7 +1102,6 @@
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
80B6DFA72142B71600BCB334 /* MKAnnotationView+WebCache.m in Sources */,
|
80B6DFA72142B71600BCB334 /* MKAnnotationView+WebCache.m in Sources */,
|
||||||
3257EAFE21898AED0097B271 /* SDImageGraphics.m in Sources */,
|
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue