SwiftUI MVVM Combine Example Made Easy: A Step-by-Step SwiftUI API Call Tutorial

preview_player
Показать описание
SwiftUI MVVM Combine Example Made Easy: A Step-by-Step SwiftUI API Call Tutorial

🤙🏾 Subscribe to the tundsdev YouTube channel

⏭ Next Video
SwiftUI Easy MVVM API JSON Example with Swift Async Await (Swift Concurrency API Example)

⏮ Previous Video
SwiftUI Easy MVVM API JSON Example with URLSession (URLSession JSON API Example)

Ready to level up your SwiftUI skills?🚀

Learn how to tackle take-home projects in SwiftUI, nail interviews, and more with this FREE course!📚

This YouTube playlist teaches you everything you need know to land your first iOS role 🫂

In this SwiftUI MVVM Combine Example, we're going to look at how we can use the Swift Combine URLSession with MVVM in SwiftUI to make a SwiftUI API Call & fetch JSON with an API. We'll look at how to use SwiftUI Combine to fetch JSON, Swift decode JSON using URLSession using Swift Combine, and how to use Combine Publishers to handle data within our SwiftUI apps.

After looking into how to request data using URLSession, we'll then look at how we can add a ProgressView whilst our app is waiting for a response from the server and is loading, we'll then wrap up by looking at swift concurrency error handling and how to handle errors with Swift Combine by using the Combine sink function to capture any errors in the case paths we need to take in this swift combine tutorial.

Getting Started with Combine (Practical Combine Framework Examples in UIKit & SwiftUI)

GitHub link:

SwiftUI Sessions Playlist:
Рекомендации по теме
Комментарии
Автор

Came across this today. ABout 1.5 year after it was published. Arguably, this is the best video on starting off with Combine. Thanks.

VaibhavKaushal-qtpr
Автор

Woaha, I watched I lot of videos about Combine & URLSession, but your seems the most straight forward without all the fillers. Thanks!

slavihinkov
Автор

Thank you for the straight forward tutorial! Combine makes a lot more sense now. One question I have though is regarding using a "Future" with Combine. I've seen it in a lot of other articles and tutorials but noticed you don't use it here. Are they only necessary for specific cases?

davidcbeaudoin
Автор

How does the alert know the error is "failed to decode" when viewModel.error was never set to UserError.failedToDecode ? (it was just thrown)

crazygreen
Автор

Hi, nice video as always, I was wondering for what combine was the best. I'm relatively new to swiftUI but for example, I found that api calls in async/await is far more readable and easier to understand that with combine. For what combine can be useful is SwiftUI ?

aimericsorin
Автор

I've finally understood some of the functional concepts behind Combine, thank you! Keep it up!

gabrielabezerra
Автор

I am on the boat of reactive programming. But I can't help but to ask how could we use combine in a reusable API and subscribe to the publisher from multiple ViewModels. VERY VERY nice and hard work with your videos by the way. Thanks.

Автор

I prefer the way you did it in the last video

MrDWade-nflv
join shbcf.ru