Skip to content

Nuke 12.0 (Beta 5)

Pre-release
Pre-release

Choose a tag to compare

@kean kean released this 20 Feb 22:17
· 1786 commits to main since this 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