Skip to content

Releases: kean/Nuke

Nuke 11.0 (Beta 3)

24 Jun 18:14
Compare
Choose a tag to compare
Nuke 11.0 (Beta 3) Pre-release
Pre-release
  • Docs completely rewritten using DocC and hosted on GitHub: Nuke, NukeUI, NukeExtensions
  • Deprecate ImageCaching extension that works with ImageRequest
  • Make ImageCacheKey initializer with ImageRequest public
  • Add static method ImageProcessing.custom(id:closure:) for creating custom processors
  • Make ImagePipeline.Cache Sendable
  • Add ImageResponse typealias to NukeUI
  • Use new ImageTask.Progress in NukeUI
  • When pipeline is invalidated, it now throws a new .pipelineInvalidated error for new requests

Nuke 11.0 (Beta 2)

18 Jun 01:43
Compare
Choose a tag to compare
Nuke 11.0 (Beta 2) Pre-release
Pre-release

In addition to changes made in Nuke 11.0 (Beta 1):

  • Add DocC support. For the latest documentation, use the docs from the project repo.
  • Add imageCache(for:pipeline:) method to ImagePipelineDelegate
  • Remove public ImagePublisher class (make it internal)
  • ImageProcessing types that implement Hashable protocol now get default hashableIdentifier implementation - #563
  • Add a way to customize decompression using ImagePipelineDelegate
  • Remove CocoaPods support
  • Remove ImageTaskEvent and consolidate it with the new ImageTaskDelegate API - #564
  • Add ImageTask.Progress to simplify progress reporting APIs
  • Add ImageRequest.Options.skipDecompression
  • Remove progress monitoring using Foundation.Progress
  • Remove ImageRequestConvertible conformance from String

For feedback, please use Nuke 11 Discussion Channel

Nuke 11.0 (Beta 1)

15 Jun 01:21
Compare
Choose a tag to compare
Nuke 11.0 (Beta 1) Pre-release
Pre-release

Nuke 11 embraces Swift Structured Concurrency with full feature parity with completion-based APIs. With NukeUI now being part of the main repo, adding async image loading into your apps is easier than ever. There are no major source-breaking changes, but tens of API refinements to make the framework more ergonomic.

For feedback, please use Nuke 11 Discussion Channel

Structured Concurrency

Extend Async/Await APIs to have complete feature parity with the existing completion-based APIs paving the road for its eventual deprecation and removal in the future major versions.

  • Make @MainActor the following types: FetchImage, LazyImage, LazyImageView, Nuke loadImage(into:) method
  • Make most types Sendable, including ImagePipeline, ImageRequest, ImageResponse, ImageContainer, ImageTask, and many more
  • Add ImageTaskDelegate to achieve complete feature-parity with completion-based APIs - #559

Loading an image and monitoring download progress:

func loadImage() async throws {
    let response = try await pipeline.image(for: "https://example.com/image.jpeg", delegate: self)
}

func imageTaskWillStart(_ task: ImageTask) {
    // You can capture a task instance here to change priority later, etc
}

func imageTask(_ task: ImageTask, didUpdateProgress progress: (completed: Int64, total: Int64)) {
    print("Image task did update progress: \(progress)")
}
  • Add images(for:) method that returns an AsyncThrowingStream to represent progressive decoding - #558

Progressively loading an image using an async sequence:

for try await response in pipeline.images(for: "https://example.com/image.jpeg") {
   print("Decoded a new image: \(response)")
}
  • ImageRequest now accepts async/await function to fetch data as a resource

NukeUI and Nuke Extensions

  • Move NukeUI to the main Nuke repo
  • Remove deprecated APIs from NukeUI
  • NukeUI no longer exposes public Gifu dependency or its APIs
  • Move UIImageView / NSImageView extensions to a separate target NukeExtensions and soft-deprecated them - #555

Error Reporting Improvements

  • Make an "advanced" version of ImageProcessing APIs throwing
  • Make ImageDecoding throwing
  • Add support for throwing processing in ImageProcessors.CoreImageFilter
  • Add ImageDecoding instance, ImageDecodingContext, and underlying error to .decodingFailed error case
  • Add ImageProcessingContext and underlying error to .processingFailed error case
  • Add .dataMissingInCache error case for a scenario where data is missing in cache and download is disabled using .returnCacheDataDontLoad.
  • Add .dataIsEmpty error case for a scenario where the data loader doesn't report an error, but the response is empty.
  • Add .decoderNotRegistered(context:) error case for a scenario where no decoders are registered for the downloaded data. This should never happen unless you remove the default decoder from the registry.
  • Add .imageRequestMissing error case for a scenario when the load image method is called with no image request.
  • Add cacheType to ImageDecodingContext

Other Changes

  • Increase the minimum supported Xcode version to 13.3
  • Increase minimum supported platforms: iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15
  • Use preparingForDisplay on iOS 15 and tvOS 15
  • Add ImageRequest to ImageResponse
  • Automatically discover typos on CI - #549
  • Add an option to skip load data immediately by skipping the data loading queue - #552
  • Implement custom disk caching for requests backed by data publishers - #553
  • Deprecate ImageDecoderRegistering
  • Make ImageDecoderRegistry initializer private
  • Make ImageDecodingContext, ImageProcessingContext, ImageResponse properties publicly writable
  • Rename isFinal in ImageProcessingContext to isCompleted to match the renaming APIs
  • DataLoader now collects metrics URLSessionTaskMetrics and reports them using an existing DataLoaderObserving protocol
  • Add static default and imageIO functions to ImageEncoding protocol for easy creating of encoders
  • Make ImageCache ttl optional instead of using 0 as a "never expires" indicator
  • Add sizeLimit to withDataCache ImagePipeline.Configuration initializer
  • Remove WKInterfaceObject support (in favor of SwiftUI)
  • Remove ImageType typealias (deprecated in 10.5)
  • Remove Cancellable conformance from URLSessionTask

Nuke 10.11.2

10 Jun 02:29
Compare
Choose a tag to compare
  • Revert changes to the deployment targets introduced in 10.10 release

The minimum deployment targets will be increased in the upcoming major release

Nuke 10.11.1

10 Jun 01:00
Compare
Choose a tag to compare
  • Fix an issue with data not always being attached to an error when decoding fails

Nuke 10.11.0

08 Jun 21:14
Compare
Choose a tag to compare
  • Add associated Data to ImagePipeline.Error.decodingFailed - #545, thanks to Shai Mishali

There are other major improvements to error reporting coming in Nuke 11

Nuke 10.10.0

21 May 17:18
Compare
Choose a tag to compare
  • Remove APIs deprecated in Nuke 10.0
  • Increase minimum deployment targets to iOS 12.0, watchOS 5.0, macOS 10.14, tvOS 12.0

Nuke 10.9.0

01 May 15:43
Compare
Choose a tag to compare
  • Rename recently added async/await loadImage(with:) method to image(for:), and loadData(with:) to data(for:) (to match Apple naming convention)
  • Add Sendable conformance to some of the types

Nuke 10.8.0

24 Apr 14:58
Compare
Choose a tag to compare
  • Add async/await support (requires Xcode 13.3) – #532
extension ImagePipeline {
    public func loadImage(with request: ImageRequestConvertible) async throws -> ImageResponse
    public func loadData(with request: ImageRequestConvertible) async throws -> (Data, URLResponse?)
}

extension FetchImage {
    public func load(_ action: @escaping () async throws -> ImageResponse)
}

Nuke 10.7.2

23 Apr 23:13
Compare
Choose a tag to compare
  • Remove code deprecated in Nuke 9.4.1