Skip to content

Releases: kean/Nuke

Nuke 12.2 (Beta 1)

22 Jun 02:54
Compare
Choose a tag to compare
Nuke 12.2 (Beta 1) Pre-release
Pre-release
  • Fix compilation errors on xrOS
  • Fix warnings in Xcode 15

Nuke 12.1

25 Mar 17:04
Compare
Choose a tag to compare
  • Add makeImageView closure to LazyImageView to allow using custom views for rendering images
  • Add onCompletion closure to LazyImage and FetchImage
  • Fix an issue with .videoAssetKey value missing from ImageContainer
  • Fix an issue with .gif being encoded as .jpeg when .storeEncodedImages policy is used

Nuke 12.0

04 Mar 19:21
Compare
Choose a tag to compare

Nuke 12 enhances the two main APIs introduced in the previous release: LazyImage and the async ImagePipeline methods. They are faster, more robust, and easier to use.

The migration guide is available to help with the update. The minimum requirements are unchanged from Nuke 11.

NukeUI 2.0

NukeUI started as a separate repo, but the initial production version was released as part of Nuke 11. Let's call it NukeUI 1.0. The framework was designed before the AsyncImage announcement and had a few discrepancies that made it harder to migrate from AsyncImage. This release addresses the shortcomings of the original design and features a couple of performance improvements.

  • LazyImage now uses SwiftUI.Image instead of NukeUI.Image backed by UIImageView and NSImageView. It eliminates any discrepancies between LazyImage and AsyncImage layout and self-sizing behavior and fixes issues with .redacted(reason:), ImageRenderer, and other SwiftUI APIs that don't work with UIKIt and AppKit based views.
  • Remove NukeUI.Image so the name no longer clashes with SwiftUI.Image
  • Fix #669: redacted not working for LazyImage
  • GIF rendering is no longer included in the framework. Please consider using one of the frameworks that specialize in playing GIFs, such as Gifu. It's easy to integrate, especially with LazyImage.
  • Extract progress updates from FetchImage to a separate observable object, reducing the number of body reloads
  • LazyImage now requires a single body calculation to render the response from the memory cache (instead of three before)
  • Disable animations by default
  • Fix an issue where the image won't reload if you change only LazyImage processors or priority without also changing the image source
  • FetchImage/image now returns Image instead of UIImage
  • Make _PlatformImageView internal (was public) and remove more typealiases

Concurrency

Redesign the concurrency APIs making them more ergonomic and fully Sendable compliant.

  • Add ImagePipeline/imageTask(with:) method that returns a new type AsyncImageTask
let task = ImagePipeline.shared.imageTask(with: URL(string: "example.com"))
task.priority = .high
for await progress in task.progress {
    print("Updated progress: ", progress)
}
let image = try await task.image
  • The existing convenience ImagePipeline/image(for:) method now returns an image instead of ImageResponse
  • Remove the delegate parameter from ImagePipeline/image(for:) method to address the upcoming concurrency warnings in Xcode 14.3
  • Remove ImageTaskDelegate and move its methods to ImagePipelineDelegate and add the pipeline parameter

Nuke

  • Add a new initializer to ImageRequest.ThumbnailOptions that accepts the target size, unit, and content mode - #677
  • ImageCache uses 20% of available RAM which is quite aggressive. It's an OK default on iOS because it clears 90% of the used RAM when entering the background to be a good citizen. But it's not a good default on a Mac. Starting with Nuke 12, the default size is now strictly limited to 512 MB.
  • ImageDecoder now defaults to scale 1 for images (configurable using UserInfoKey/scaleKey)
  • Removes APIs deprecated in the previous versions
  • Update the Performance Guide

NukeVideo

Video playback can be significantly more efficient than playing animated GIFs. This is why the initial version of NukeUI provided support for basic video playback. But it is not something that the majority of the users need, so this feature was extracted to a separate module called NukeVideo.

There is now less code that you need to include in your project, which means faster compile time and smaller code size. With this and some other changes in Nuke 12, the two main frameworks – Nuke and NukeUI – now have 25% less code compared to Nuke 11. In addition to this change, there are a couple of improvements in how the precompiled binary frameworks are generated, significantly reducing their size.

  • Move all video-related code to NukeVideo
  • Remove ImageContainer.asset. The asset is now added to ImageContainer/userInfo under the new .videoAssetKey.
  • Reduce the size of binary frameworks by up to 50%

Nuke 12 (RC1)

25 Feb 03:30
Compare
Choose a tag to compare

Nuke 12.0 (Beta 5)

20 Feb 22:17
Compare
Choose a tag to compare
Nuke 12.0 (Beta 5) Pre-release
Pre-release

Redesign the concurrency APIs in Nuke ahead of the upcoming changes in Xcode 14.3, making them safer and ergonomic to use, and fully Sendable-compliant.

  • Add ImagePipeline/imageTask(with:) method that returns a new type AsyncImageTask that you can use to monitor the task progress, change its priority, and, of course, fetch the response.
let task = ImagePipeline.shared.imageTask(with: URL(string: "example.com"))
for await progress in task.progress {
    print("Updated progress: ", progress)
}
let image = try await task.image
  • The existing convenience ImagePipeline/image(for:) methods now return an image (UIImage or NSImage) instead of ImageResponse
  • Remove the delegate parameter from the existing ImagePipeline/image(for:) async/await method to address the upcoming concurrency warnings in Xcode 14.3
  • Remove ImageTaskDelegate and move its methods to ImagePipelineDelegate and add the pipeline parameter
  • Add one final LazyImage optimization where when the image is in memory cache, LazyImage now requires a single body calculation to render it (instead of three before) – can't get better than this
  • Use an improved way to generate xcframeworks, significantly reducing their size

Nuke 11.6.4

20 Feb 02:40
Compare
Choose a tag to compare
  • Fix #671: ImagePipeline/image(for:) hangs if you cancel the async Task before it is started. Thanks @muukii for reporting and providing a sample.

Nuke 12.0 (Beta 4)

19 Feb 04:46
Compare
Choose a tag to compare
Nuke 12.0 (Beta 4) Pre-release
Pre-release
  • Remove the convenience LazyImage(url:content:placeholder:) init method that doesn't offer much compared to the main init and remove public _LazyImageContents
  • Fix an issue where if you change the LazyImage's processors or priority without also changing the image source, the image wasn't being reloaded
  • Remove some of the typealises from NukeUI
  • Remove the deprecated APIs in NukeUI
  • Add missing scale parameter to init with content
  • ImageDecoder now defaults to scale 1 for images
  • Remove scale parameter from LazyImage init: it's available via ImageRequest userInfo

Nuke 11.6.3

19 Feb 04:06
Compare
Choose a tag to compare
  • Fix warnings in Xcode 14.3

Nuke 12.0 (Beta 3)

18 Feb 22:53
Compare
Choose a tag to compare
Nuke 12.0 (Beta 3) Pre-release
Pre-release
  • ImageCache uses 20% of available RAM which is quite aggressive. It's a good default on iOS because it clears 90% of the used RAM when entering the background to be a good citizen. But it's not a good default on a Mac where the app is constantly running, and the RAM usage is highly visible. Starting with Nuke 12, the default size is now strictly limited by 512 MB.
  • Move all video-related code to a separate module NukeVideo, so that the users who don't need it, which are the majority, don't need to pay the extra compile time / code size price. With this and other changes in Nuke 12, if you install NukeUI, you are now adding 25% less code to your project compared to Nuke 11.
  • Remove ImageContainer.asset. The asset is now added to ImageContainer/userInfo under the new .videoAssetKey.
  • Make _PlatformImageView internal (was public)
  • Fix an issue with FetchImage/progress not delivering updates
  • FetchImage/progress is now created lazily
  • Remove callbacks from FetchImage
  • FetchImage/image now returns Image instead of PlatformImage

Nuke 12.0 (Beta 2)

18 Feb 02:00
Compare
Choose a tag to compare
Nuke 12.0 (Beta 2) Pre-release
Pre-release
  • Extract progress from FetchImage to a separate observable object and reduce a number of body reloads
  • Disable animations by default

See also: Nuke 12.0 (Beta 1) changes