How to use SDWebImage in SwiftUI | Swift Packages #1

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ส.ค. 2024
  • Unlock the power of SDWebImage in your SwiftUI applications with our detailed tutorial. This video will guide you through integrating SDWebImage, a popular Swift Package for asynchronous image loading and caching, into your SwiftUI projects. Learn how to seamlessly display images from the web in your apps, improving user experience and app performance. Ideal for SwiftUI developers looking to enhance their app's image handling capabilities. This tutorial is a part of our Swift Packages series, aimed at providing practical skills for utilizing essential Swift Packages in SwiftUI. Subscribe for more tutorials on Swift Packages and advanced SwiftUI techniques.
    🤙 WELCOME BACK 🤙
    WEBSITE: www.swiftful-thinking.com
    DISCORD: / discord
    GITHUB: github.com/SwiftfulThinking/
    SAY THANKS: www.buymeacoffee.com/nicksarno
    🤙 #KEEPGOING 🤙
    0:00 SDWebImageSwiftUI
    02:34 What is SDWebImage?
    03:20 ReadMe
    04:41 import Package
    07:35 Code start
    10:12 Customizing
    14:02 Implementation tips
    19:41 The most comm on SwiftUI image bug
    22:16 Preloading
    24:53 Wrapping up

ความคิดเห็น • 28

  • @arunmurugan5196
    @arunmurugan5196 4 หลายเดือนก่อน

    Thank you for sharing this informative video on SwiftUI package! It's been incredibly helpful for me. I would love to see more content like this in the future. Keep up the great work!.

  • @gagnassss
    @gagnassss 4 หลายเดือนก่อน

    Thanks a lot for your video Nick. With your tutorial I've solved an issue where I stuck for weeks! Great video!

  • @govind20246
    @govind20246 4 หลายเดือนก่อน

    Very informative 👏 thanks

  • @mokanoir
    @mokanoir 3 หลายเดือนก่อน

    Great stuff... 👍🏻 Thank you... 😊

  • @kumarabnit3525
    @kumarabnit3525 24 วันที่ผ่านมา

    Thank you for the video. How do we set access token as header for url which needs authentication to load image? the way we were doing in UIKit is returning 401 error?

  • @itsayan1616
    @itsayan1616 4 หลายเดือนก่อน

    👏🙌

  • @mokanoir
    @mokanoir 3 หลายเดือนก่อน

    I have tried to set the options for the cache to save to disk only:
    WebImage(url: URL(string: url), context: [.storeCacheType: SDImageCacheType.disk]) { image in...
    But when the app starts on the simulator, it crashes. Is there another way to disable the cache to memory so that the cash only stored on the disk?

  • @user-to7yg5wm6d
    @user-to7yg5wm6d 4 หลายเดือนก่อน

    Which macbook do you have?

  • @AdamTabiev
    @AdamTabiev 4 หลายเดือนก่อน

    🤯🤯

  • @acmcj
    @acmcj 4 หลายเดือนก่อน

    Amazing video as always. Would you use this package if you’re downloading images from Firebase/Firestore?

    • @SwiftfulThinking
      @SwiftfulThinking  4 หลายเดือนก่อน

      Absolutely, just need the url from where it’s saved in Storage

    • @acmcj
      @acmcj 4 หลายเดือนก่อน

      Thanks Nick. Will try it out. Assumed there would be security/access constraints to accessing those images using one of these packages. Thank you

    • @SwiftfulThinking
      @SwiftfulThinking  4 หลายเดือนก่อน

      @@acmcj It depends on your Storage security rules. If the url is public there is no problem

    • @SwiftfulThinking
      @SwiftfulThinking  4 หลายเดือนก่อน +1

      Otherwise I think you can use the Firebase API to get the image url first

    • @acmcj
      @acmcj 4 หลายเดือนก่อน

      @@SwiftfulThinking yeah thought so. So really should only use these packages for public images like profile pics etc. User stored images that would be behind security rules would need to do it “manually/traditional” like you’ve shown in your other videos. Thanks.

  • @hakobghlijyan
    @hakobghlijyan 4 หลายเดือนก่อน

    Hello Nick 😊. Thanks your tutorials...
    1. How register account your site?
    2. How see playlist for Git & Source Control and SwiftUI in Practice?

    • @SwiftfulThinking
      @SwiftfulThinking  4 หลายเดือนก่อน +1

      Those are coming to YT soon 👍

    • @hakobghlijyan
      @hakobghlijyan 4 หลายเดือนก่อน

      @SwiftfulThinking I'll be looking forward to it. Thank you.

  • @hackenbacker
    @hackenbacker 4 หลายเดือนก่อน

    Why did you choose SDWebImage over Kingfisher ?
    (Sorry. I didn't hear that. 3:09)

    • @SwiftfulThinking
      @SwiftfulThinking  4 หลายเดือนก่อน +3

      SDWebImage seems easier to use and more performant. However, the next video is Kingfisher 😂

    • @Designguidetv
      @Designguidetv 4 หลายเดือนก่อน +1

      @@SwiftfulThinking it will be interesting to see the difference

  • @hackenbacker
    @hackenbacker 4 หลายเดือนก่อน

    SDWebImageSwiftUI has been updated to v3.0.0.
    I think the code has to be modified a bit. 🤔

  • @AlbertAsadov
    @AlbertAsadov 4 หลายเดือนก่อน

    thanks Nick! Please do bootcamp for UIKit !)

  • @911lalala
    @911lalala 4 หลายเดือนก่อน

    Thanks Nick! BTW Can We have visionPro content please?

    • @natgenesis5038
      @natgenesis5038 4 หลายเดือนก่อน +1

      It’s not important to learn visionPro because it’s too expensive to buy it ,so you will have very poor audience .

    • @ProgramJerol
      @ProgramJerol 4 หลายเดือนก่อน +1

      give visionOS 2/3 years. It still is early and your audience is very limited.