How to Network Like A Pro | Async/Await | Pagination | Error Handling | From A Meta Engineer
ฝัง
- เผยแพร่เมื่อ 4 ม.ค. 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 ... - วิทยาศาสตร์และเทคโนโลยี
Thank you just what I needed please post more content!
love the content, keep up the good work!
NEW VIDEO FROM MY FAV TEACHER & MENTOR. Thanks brother, happy new year 🎉
Happy new year to you too man!
It’s gold.
Thank you!
thank you for the video. Great tutorial!
amazing tutorial, we love it 💕🔥
I was a obj-c programmer , so many swiftui thing need to pick up . you tutorial is so helpful ,thx
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
You are the best👌🏻
This is amazing, thank you
Beautiful vid
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
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.
Please make a tutorial about access and refresh token
22:35 Would it handle more cases if we did showAlert = true instead of showAlert.toggle()?
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?
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?
It’s just not really necessary to implement an entire swift package that essentially does the same thing
28:43 could we create an extension on ForEach called onLastAppear() and remove some of the plumbing logic?
Can you please make a video on video calling with swiftui without agora or other paid tools.
Using native solutions like RTC. 🙏
W bro
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 ?
I work for a very large company, and almost all of our networking code was refactored to use async await
9:32, when you say this function is going to be async, does that mean it just runs on a different thread?
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?
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.
4:51 what does the // MARK: comment do?
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
let page = coins.count / pageLimit + 1. should help you
Long time no see you. Hope you doing well
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
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
How to adjust this to support a POST http ?
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.
video starts at 2:16
The link of STARTER PROJECT does not work
dito link of STARTER PROJECT does not work
Clicking the link should download the project to your downloads folder
Network like a pro? this is joke right?