How to Network Like A Pro | Async/Await | Pagination | Error Handling | From A Meta Engineer

Sdílet
Vložit
  • čas přidán 4. 01. 2023
  • Learn how to write professional networking code with SwiftUI using an amazing cryptocurrency application.
    Feature list:
    👉 Async/Await for fetching live crypto data with SwiftUI
    👉 Error Handling
    👉 Pagination
    👉 Refresh data
    🖥️ RESOURCES
    🔴 STARTER PROJECT (downloadable source code):
    github.com/sdowless/CryptoAsy...
    🔴 Become a member for lifetime access to source code:
    www.stephancodes.com/blank-page
    🖥️ MORE COURSES & SOURCE CODE FILES
    👉 Pro Courses:
    www.stephancodes.com/videos
    👉 iOS App Templates:
    www.stephancodes.com/shop
    👉 FREE Crypto SwiftUI Course
    • Free iOS Development C...
    👉 FREE UBER SwiftUI Course
    • 🔴 Let's Build UBER wit...
    👉 FREE Twitter SwiftUI Course
    • 🔴 Let's Build Twitter ...
  • Věda a technologie

Komentáře • 42

  • @anonanon7249
    @anonanon7249 Před rokem +1

    Thank you just what I needed please post more content!

  • @scarlet5742
    @scarlet5742 Před 11 měsíci

    love the content, keep up the good work!

  • @rank1macro
    @rank1macro Před rokem +2

    NEW VIDEO FROM MY FAV TEACHER & MENTOR. Thanks brother, happy new year 🎉

  • @vladislav2587
    @vladislav2587 Před 11 měsíci

    It’s gold.
    Thank you!

  • @galavarezzzk3610
    @galavarezzzk3610 Před 5 měsíci

    thank you for the video. Great tutorial!

  • @BABEENGINEER
    @BABEENGINEER Před 3 měsíci

    amazing tutorial, we love it 💕🔥

  • @lukemorrice8692
    @lukemorrice8692 Před měsícem

    This is amazing, thank you

  • @chings228
    @chings228 Před 11 měsíci

    I was a obj-c programmer , so many swiftui thing need to pick up . you tutorial is so helpful ,thx

    • @appstuff5778
      @appstuff5778  Před 11 měsíci

      Thanks so much Tom! Make sure you check out my website, have a ton of swift content. The diamond member plan gets you access to everything for $39/mo

  • @rrezzz
    @rrezzz Před 10 měsíci

    You are the best👌🏻

  • @ssaai
    @ssaai Před 10 měsíci +2

    Please make a tutorial about access and refresh token

  • @filipp7611
    @filipp7611 Před 11 měsíci +1

    async/await is not a "new SwiftUI feature", it is a general Swift language feature and can be used in projects without SwiftUI. Also "Combine" a bit better fits SwiftUI, so I would use "URLSession" publishers to make a request and connect the result with UI. But in general great video for beginners.

  • @garywkfung
    @garywkfung Před rokem +1

    Great video! Can you also teach us how to do this with a grid view? There doesn’t seem to be a way to do lazy loading with a grid view that has cells with different height. Like a Pinterest view

  • @user-qz9mm2eg8l
    @user-qz9mm2eg8l Před 7 měsíci

    Beautiful vid

  • @LukePighetti
    @LukePighetti Před rokem

    30:18 is there any way to structure the page number logic such that a failure to fetch page 2 followed by a scroll down will not skip page 2 content? Is this an error case worth building for?

  • @LukePighetti
    @LukePighetti Před rokem

    22:35 Would it handle more cases if we did showAlert = true instead of showAlert.toggle()?

  • @adeby
    @adeby Před rokem

    Thanks for the video, informative. Special thanks for the MainActor! I wanted to know why you don't use alamofire and what might be a problem with it?

    • @appstuff5778
      @appstuff5778  Před rokem +1

      It’s just not really necessary to implement an entire swift package that essentially does the same thing

  • @okeyshourovroy2769
    @okeyshourovroy2769 Před rokem

    Can you please make a video on video calling with swiftui without agora or other paid tools.
    Using native solutions like RTC. 🙏

  • @LukePighetti
    @LukePighetti Před rokem

    28:43 could we create an extension on ForEach called onLastAppear() and remove some of the plumbing logic?

  • @Aureliola
    @Aureliola Před rokem

    Long time no see you. Hope you doing well

  • @josejaimefelixgarciagarcia8884

    9:32, when you say this function is going to be async, does that mean it just runs on a different thread?

  • @krishnavivek9254
    @krishnavivek9254 Před 11 měsíci

    Hi Stephan,
    Video is informative and coding is relaly impressive.
    It seems that async/await is not used in production due to stack corruption bugs. Is it worthy to use thsi in our projects ?

    • @appstuff5778
      @appstuff5778  Před 11 měsíci +1

      I work for a very large company, and almost all of our networking code was refactored to use async await

  • @reignofrage
    @reignofrage Před rokem

    W bro

  • @LukePighetti
    @LukePighetti Před rokem

    4:51 what does the // MARK: comment do?

  • @LukePighetti
    @LukePighetti Před rokem

    17:39 does annotating this function with @MainActor cause the entire fetching operation to be executed on the main thread instead of a background thread? Does it block UI updates?

    • @amdizle28
      @amdizle28 Před rokem

      From what I have read it would put all code in the func marked with @MainActor to run on the main thread so if you have an API call there it could block UI on the main thread. Better to separate concerns and dispatchMain for UI updates or call another func for just updating UI.

  • @LukePighetti
    @LukePighetti Před rokem

    25:12 can you please explain why the coins would get stacked? It looks like a successful fetch is setting the coins array values, not appending them to the array

    • @hemantstha4144
      @hemantstha4144 Před 11 měsíci

      let page = coins.count / pageLimit + 1. should help you

  • @shafferzeyn9710
    @shafferzeyn9710 Před rokem

    can you add .searchable() this list view please. I want learn how to filter search data from API.You have very nice code teach talent.Thanks

    • @appstuff5778
      @appstuff5778  Před rokem

      Your API would need to support searching functionality. This is just fetching a big block of JSON, so you need to do the filtering client side

  • @stephenaldous762
    @stephenaldous762 Před rokem +1

    How to adjust this to support a POST http ?

    • @jasenhansen9788
      @jasenhansen9788 Před rokem

      I second this request. If you post data to a server (database) via a PHP WebService, for example, is there an efficient way to confirm delivery.

  • @kujtims
    @kujtims Před 4 měsíci

    video starts at 2:16

  • @lorenzolaricchia6584
    @lorenzolaricchia6584 Před rokem

    The link of STARTER PROJECT does not work

    • @jazz_devk1
      @jazz_devk1 Před rokem +1

      dito link of STARTER PROJECT does not work

    • @appstuff5778
      @appstuff5778  Před rokem

      Clicking the link should download the project to your downloads folder

  • @phitsch
    @phitsch Před 2 měsíci

    Network like a pro? this is joke right?