Changelog History
Page 2
-
v8.4.2 Changes
April 02, 2020- ๐ฆ Distribute as a dynamic library via Swift Package Manager
-
v8.4.1 Changes
March 20, 2020- ๐ Podspec now explicitly specifies supported Swift versions - 340, Richard Lee
- ๐ Fix a memory leak when the URLSession wasn't deallocated correctly - 336
Announcements
๐ฆ There are two new Swift packages available in Nuke ecosystem:
- FetchImage makes it easy to download images using Nuke and display them in SwiftUI apps. One of the notable features of
FetchImage
is support for iOS 13 Low Data mode. - ImagePublisher provides Combine publishers for some of the Nuke APIs.
Both are distributed exclusively via Swift Package Manager. And both are API previews. Please, try them out, and feel free to contact me with any feedback that you have.
-
v8.4.0 Changes
November 18, 2019- ๐ Fix an issue with
RoundedCorners
image processor not respecting theBorder
parameter โ 327, Eric Jensen - โ Add an optional
border
parameter to theCircle
processor โ 327, Eric Jensen - โ Add
ImagePipelineObserving
andDataLoaderObserving
protocols to allow users to tap into the internal events of the subsystems to enable logging and other features โ 322, Abdallah Nehme - ๐ Deprecate
Nuke.Image
to avoid name clashes withSwiftUI.Image
in the future , addPlatformImage
instead โ 321 - ๐ Make
ImagePipeline
more readable โ 320 - โก๏ธ Update demo project to use Swift Package Manager instead of CocoaPods โ 319
- ๐ Fix an issue with
-
v8.3.1 Changes
October 26, 2019 -
v8.3.0 Changes
October 06, 2019- โ Add
processors
option toImagePipeline.Configuration
โ 300, Alessandro Vendruscolo - โ Add
queue
option toloadImage
andloadData
methods ofImagePipeline
โ 304 - โ Add
callbackQueue
option toImagePipeline.Configuration
โ 304
- โ Add
-
v8.2.0 Changes
September 21, 2019- โ Add support for Mac Catalyst โ #299, Jonathan Downing
-
v8.1.1 Changes
September 01, 2019- ๐ฆ Switch to a versioning scheme which is compatible with Swift Package Manager
-
v8.1 Changes
August 25, 2019- ๐ง Configure dispatch queues with proper QoS โ #291
- โ Remove synchronization points in
ImageDecoder
which is not needed starting from iOS 10 โ #277 - โ Add Swift Package Manager to Installation Guides
- ๐ Improve Travis CI setup: run tests on multiple Xcode versions, run thread safety tests, run SwiftLint validations, build demo project, validate Swift package โ #279, #280, #281, #284, #285
-
v8.0.1 Changes
July 21, 2019- โ Remove synchronization in
ImageDecoder
which is no longer needed โ #277
- โ Remove synchronization in
-
v8.0 Changes
July 08, 2019๐ Nuke 8 is the most powerful, performant, and refined release yet. It contains major advancements it some areas and brings some great new features.
Cache processed images on disk ยท New built-in image processors ยท ImagePipeline v2 ยท Up to 30% faster main thread performance ยท
Result
type ยท Improved deduplication ยทos_signpost
integration ยท Refined ImageRequest API ยท Smart decompression ยท Entirely new documentation๐ Most of the Nuke APIs are source compatible with Nuke 7. There is also a Nuke 8 Migration Guide to help with migration.
Image Processing
#227 Cache Processed Images on Disk
๐
ImagePipeline
now supports caching of processed images on disk. To enable this feature setisDataCacheForProcessedDataEnabled
totrue
in the pipeline configuration and provide adataCache
. You can use a built-inDataCache
introduced in Nuke 7.3 or write a custom one.Image cache can significantly improve the user experience in the apps that use heavy image processors like Gaussian Blur.
#243 New Image Processors
Nuke now ships with a bunch of built-in image processors including:
ImageProcessor.Resize
ImageProcessor.RoundedCorners
ImageProcessor.Circle
ImageProcessor.GaussianBlur
ImageProcessor.CoreImageFilter
There are also
ImageProcessor.Anonymous
to create one-off processors from closures andImageProcessor.Composition
to combine two or more processors.#245 Simplified Processing API
๐ Previously Nuke offered multiple different ways to add processors to the request. Now there is only one, which is also better than all of the previous versions:
let request = ImageRequest( url: URL(string: "http://..."), processors: [ImageProcessor.Resize(size: CGSize(width: 44, height: 44), crop: true), ImageProcessor.RoundedCorners(radius: 16)] )
Processors can also be set using a respective mutable
processors
property.Notice that
AnyImageProcessor
is gone! You can simply useImageProcessing
protocol directly in places where previously you had to use a type-erased version.#229 Smart Decompression
0๏ธโฃ In the previous versions, decompression was part of the processing API and
ImageDecompressor
was the default processor set for each image request. This was mostly done to simplify implementation but it was confusing for the users.In the new version, decompression runs automatically and it no longer a "processor". The new decompression is also smarter. It runs only when needed โ when we know that image is still in a compressed format and wasn't decompressed by one of the image processors.
๐ง Decompression runs on a new separate
imageDecompressingQueue
. To disable decompression you can set a newisDecompressionEnabled
pipeline configuration option tofalse
.#247 Avoiding Duplicated Work when Applying Processors
The pipeline avoids doing any duplicated work when loading images. Now it also avoids applying the same processors more than once. For example, let's take these two requests:
let url = URL(string: "http://example.com/image") pipeline.loadImage(with: ImageRequest(url: url, processors: [ImageProcessor.Resize(size: CGSize(width: 44, height: 44)), ImageProcessor.GaussianBlur(radius: 8)])) pipeline.loadImage(with: ImageRequest(url: url, processors: [ImageProcessor.Resize(size: CGSize(width: 44, height: 44))]))
Nuke will load the image data only once, resize the image once and apply the blur also only once. There is no duplicated work done at any stage. If any of the intermediate results are available in the data cache, they will be used.
ImagePipeline v2
Nuke 8 introduced a major new iteration of the
ImagePipeline
class. The class was introduced in Nuke 7 and it contained a lot of incidental complexity due to addition of progressive decoding and some other new features. In Nuke 8 it was rewritten to fully embrace progressive decoding. The new pipeline is smaller, simpler, easier to maintain, and more reliable.It is also faster.
๐ +30% Main Thread Performance
The image pipeline spends even less time on the main thread than any of the previous versions. It's up to 30% faster than Nuke 7.
#239 Load Image Data
โ Add a new
ImagePipeline
method to fetch original image data:@discardableResultpublic func loadData(with request: ImageRequest, progress: ((\_ completed: Int64, \_ total: Int64) -\> Void)? = nil, completion: @escaping (Result\<(data: Data, response: URLResponse?), ImagePipeline.Error\>) -\> Void) -\> ImageTask
๐ This method now powers
ImagePreheater
with destination.diskCache
introduced in Nuke 7.4 (previously it was powered by a hacky internal API).#245 Improved ImageRequest API
The rarely used options were extracted into the new
ImageRequestOptions
struct and the request initializer can now be used to customize all of the request parameters.#255
filteredURL
You can now provide a
filteredURL
to be used as a key for caching in case the URL contains transient query parameters:let request = ImageRequest( url: URL(string: "http://example.com/image.jpeg?token=123")!, options: ImageRequestOptions( filteredURL: "http://example.com/image.jpeg" ) )
#241 Adopt
Result
typeAdopt the
Result
type introduced in Swift 5. So instead of having a separateresponse
anderror
parameters, the completion closure now has only one parameter -result
.public typealias Completion = (\_ result: Result\<ImageResponse, ImagePipeline.Error\>) -\> Void
๐ Performance
๐ Apart from the general performance improvements Nuke now also offers a great way to measure performance and gain visiblity into how the system behaves when loading images.
#250 Integrate
os_signpost
โ Integrate os_signpost logs for measuring performance. To enable the logs set
ImagePipeline.Configuration.isSignpostLoggingEnabled
(static property) totrue
before accessing theshared
pipeline.๐ With these logs, you have visibility into the image pipeline. For more information see WWDC 2018: Measuring Performance Using Logging which explains
os_signpost
in a great detail.๐ Documentation
๐ All the documentation for Nuke was rewritten from scratch in Nuke 8. It's now more concise, clear, and it even features some fantastic illustrations:
The screenshots come the the reworked demo project. It gained new demos including Image Processing demo and also a way to change
ImagePipeline
configuration in runtime.Misc
- โ Add a cleaner way to set
ImageTask
priority using a newpriority
property โ #251 - ๐ [macOS] Implement image cost calculation for
ImageCache
โ #236 - ๐ [watchOS] Add
WKInterfaceImage
support - ๐ Future-proof Objective-C
ImageDisplaying
protocol by addingnuke_
prefixes to avoid clashes in Objective-C runtime - โ Add convenience
func decode(data: Data) -> Image?
method with a defaultisFinal
argument toImageDecoding
protocol โ e3ca5e - โ Add convenience
func process(image: Image) -> Image?
method toImageProcessing
protocol DataCache
will now automatically re-create its root directory if it was deleted underneath it- โ Add public
flush
method toDataCache