Swiftpack.co - d-date/ImagePipelineCombine as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by d-date.
d-date/ImagePipelineCombine 0.2.0
An image loading and caching framework for SwiftUI using Combine.
⭐️ 15
🕓 3 years ago
iOS macOS tvOS
.package(url: "https://github.com/d-date/ImagePipelineCombine.git", from: "0.2.0")

MIT License

ImagePipelineCombine

An image loading and caching framework for SwiftUI using Combine.

This framework respects ImagePipeline, but cutting off image process feature.

Usage

For SwiftUI

By using RemoteImage confirming to SwiftUI.View, fetch image with URL and cache on memory.

var body: some View {
  RemoteImage(url: url, defaultImage: defaultImage)
}

Using Publisher

  let pipeline = ImagePipeline()
  pipeline.load(url)
    .sink { (completion) in

    } receiveValue: { (image) in
    
    }
  }
  .store(in: &cancellables)  

Supported content types

✅ PNG
✅ JPEG
✅ GIF
✅ WebP

Supported platforms

  • macOS v10.15 and later
  • iOS v13.0 and later
  • tvOS v13.0 and later

Note: watchOS is not supported now since SnapshotTesting is not supported for watchOS.

Work in progress

  • ☐ Disk Caching
  • ☐ Image Processing

Installation

Only support via Swift package manager installation.

Swift Package Manager

dependencies: [
  .package(url: "https://github.com/d-date/ImagePipelineCombine.git", from: "0.1.0")
]

GitHub

link
Stars: 15
Last commit: 2 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics