Loading image from remote URL asynchronously in SwiftUI Image using combine's Publisher
问题 I was looking for good solutions for loading images asynchronously from a remote server image URL. There were many solutions online. It's a shame Apple doesn't provide one natively for something that is so common. Anyways, I found Sundell's blog really interesting and took the good bits from it to create my own ImageLoader, as shown below: import Combine class ImageLoader { private let urlSession: URLSession private let cache: NSCache<NSURL, UIImage> init(urlSession: URLSession = .shared,