Skip to content

Displaying a Firestore image in SwiftUI

   

How to display a Firestore image in SwiftUI. UIImage can be easily displayed using SDWebImage, but SwiftUI can't do that. I used SDWebImage/SDWebImageSwiftUI to write the following I feel like there's a better way to write this, so that it's cached, including the tokens.

Reference: iOS でファイルをダウンロードする SDWebImage/SDWebImageSwiftUI

  1. Detecting changes to the SwiftUI Toggle
  2. Creating a multi-line picker in SwiftUI
  3. Don't show the Label in the SwiftUI Picker
  4. Displaying a Picker in SwiftUI
  5. Calling the transition source method from the view of the screen transition destination in SwiftUI
  6. Create a sequential numbered array in Swift
  7. Using TabView to switch screens (SwiftUI)