Avg Release Cycle
42 days ago
- ➕ Add
Resulttype to Kingfisher. Now all callbacks in Kingfisher are using
Resultinstead of tuples. This is more future-friendly and provides a modern way to make error handling better.
- 👉 Make
KingfisherErrormuch more elaborate and accurate. Instead of simply provides the error code, now
KingfisherErrorcontains error reason and necessary associated values. It will help to understand and track the errors easier.
- 👍 Better cache management by separating memory cache and disk cache to their own storages. Now you can use
- Image cache of memory storage would be purged automatically in a certain time interval. This reduce memory pressure for other parts of your app.
ImageCacheis rewritten from scratch, to get benefit from new created
DiskStorage. At the same time, this hybrid cache abstract keeps most API compatibility from the earlier versions.
- Now the
ImageCachecan receive only raw
Dataobject and cache it as needed.
- 🐎 A
KingfisherParsedOptionsInfotype to parse
KingfisherOptionsInfoItems in related API. This improves reusability and performance when handling options in Kingfisher.
- An option to specify whether an image should also prefetched to memory cache or not.
- 🔀 An option to make the disk file loading synchronously instead of in its own I/O queue.
- Options to specify cache expiration for either memory cache or disk cache. This gives you a chance to control cache lifetime in a per-task grain size.
- ➕ Add a default maximum size for memory cache. Now only at most 25% of your device memory will be used to kept images in memory. You can also change this value if needed.
- An option to specify a processing queue for image processors. This gives your flexibility if you want to use main queue or if you want to dispatch the processing to a different queue.
DownsamplingImageProcessorfor downsampling an image to a given size before loading it to memory.
- ➕ Add
ImageDataProviderprotocol to make it possible to provide image data locally instead of downloading from network. Several concrete types are provided to load images from data format. Use
LocalFileImageDataProviderto load an image from a local disk path,
Base64ImageDataProviderto load image from a Base64 string representation and
RawImageDataProviderto provide a raw
- 👍 A general
Sourceprotocol to define from where the image should be loaded. Currently, we support to load an image from
ImageDataProvideror from network now.
- Now CommonCrypto from system is used to calculate file name from cache key, instead of using a customized hash algorithm.
- An issue which causes
ImageDownloadercrashing when a lot of downloading tasks running at the same time.
- 💻 All operations like image pretching and data receiving should now be performed in non-UI threads correctly.
- 🐎 Now
KingfisherCompatibleuses struct for
kfnamespacing for better performance.
- ➕ Add
- ➕ Add Swift 4 compatibility back.
- Increase watchOS target to 3.0 in podspec.
- ➕ Add a
waitForCacheoption to allowing cache callback called after cache operation finishes. #963
- Animated image now will recognize
.finite(1)the same thing. #982
- Replace class-only protocol keyword with AnyObject as Swift convention. #983
- A wrong cache callback parameter when storing cache with background decoding. #986
downloadHolderin a serial queue to avoid racing. #984
- ➕ Add a
- WKInterfaceImage setting image interface for watchOS. #913
- A new delegate method for watching
ImageDownloaderobject completes a downloading request with success or failure. #901
- 👉 Use newly created operation queue for downloader.
- Filter.init(tranform:) is renamed to Filter.init(transform:)
- Some internal minor fix on constant and typo, etc.