🐛 Call for Testing. This release contains some major internal changes to the core APIs. Please help with testing the newly introduced and the existing ImagePipeline
APIs, and report any issues before it gets shipped.
This release contains some major improvements to the Structured Concurrency support and introduced a re-engineered ImagePipeline
.
- Add
previews: AsyncStream<ImageResponse>
,progress: AsyncStream<Progress>
,image: PlatformImage async
andreponse: ImageResponse async
directly toImageTask
and deprecateAsyncImageTask
. These APIs have zero cost unless you use them. - Add
ImageTask.Event
and addevents: AsyncStream<Event>
toImageTask
for observing all events associated with the image loading. - Improve the support for
AsyncStream
: a new stream is created every time you access the respective property to make it easier to have multiple consumers. - Add
ImagePipelineDelegate/imageTask(:didReceiveEvent:pipeline:)
and deprecate the previous methods it replaced (context: these methods were introduced in Nuke 11.0 as the initial and misguided attempt at Structured Concurrency support that tried to borrow from theURLSession
API design) - (Internal) Rework
ImagePipeline
that accumulated a lot of cruft after the introduction of data tasks, Combine, Async/Await, and AsyncStream support in the previous releases. - Deprecate
ImagePipeline/loadData(with:)
andImagePipeline/data(with:)
methods that acceptURL
as parameters – use theImageRequest
variants instead (these are rarely used and low-level APIs that don't require convenience variants) - Remove
@discardableResult
fromImagePipeline/data(with:) async throws
– it was never meant to be there - Rename
ImageTask/progress
toImageTask/currentProgress
(warning: this is a small breaking change in the API) - Fix some of the Strict Concurrency Checking & Swift 6 warnings preparing for the upcoming Swift releases
- Fix documentation for
AsyncImageTask/previews
that was previously specifying that it was delivering the previews and the final image – it's only the previews.