Build A Reusable Networking Layer In Swift with Generics

preview_player
Показать описание
Build A Reusable Networking Layer In Swift with Generics

🤙🏾 Subscribe to the tundsdev YouTube channel

⏭ Next Video
Using MVVM to Create our PeopleViewModel

⏮ Previous Video
What is MVVM For Beginners (What is MVVM?)

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 video, we'll bring together our knowledge of generics and look at building a singleton class that we can use to easily help us with networking in our iOS applications.

We'll talk about how building this class will help us out with making our networking code easier.

Communicate Between Views In SwiftUI With Closures, Understand Swift Closures & @escaping In Swift

Understand Classes vs Structures in Swift in Under 10 minutes (iOS Interview Question)

SwiftUI Easy MVVM API JSON Example with URLSession (URLSession JSON API Example)

What is a REST API? (REST API Explained for beginners)

How To Use Codable in Swift (Codable Swift)

Advanced Codable in Swift

How To Use Postman To Test A REST API (Postman Tutorial)

SwiftUI iOS Take Home Test Resources

SwiftUI iOS Take Home Test Course (Learn SwiftUI Online For Free, SwiftUI Free Online Course, iOS Dev Job Interview Practice - Take Home Project)

👦 SwiftUI Sessions - Beginners (Learn SwiftUI Online For Free, SwiftUI Free Online Course)
Рекомендации по теме
Комментарии
Автор

It has to be the best walk-through I've seen on YouTube about making a network request. Such a thorough step-by-step process that is clearly explained and executed. Great job, Tunds! 👏😃

coolcodingdad
Автор

I use a NetworkManager with both a Combine and a Completion Handler version that is almost exactly like this one. It is always helpful to review the code as I seem to pick up new tidbits every time I listen to someone else describe the process. Thanks for the clear and consise explanation!

KimbrellBrad
Автор

Never seen ~= before. Very useful, thanks!

paulpenketh
Автор

This episode has been very beneficial for me. I think that I had some of the pieces, but this put it all together. And a a bonus, on the topic of @Escaping a missing light was lit for me. 
Thank you so much for the episodes that are all of interest to me.
A question you add an x to the the absolute string to provoke an error? But the error is misleading pointing to a decoding error, when I would be much surprised if any data was actually fetched. I believe that invalidURL only cas an error if it cannot unwrap, but not if the url points to nowhere. 😆One could search for the decoding error for some time.

larschristiansen
Автор

Have you used Alamofire? Is it worth building your own networking manager when Alamofire has so many features

rtorcato
Автор

In the above response code - The range (200...300) should be (200..<300) to include 200 but exclude 300, which is the correct range for successful HTTP status codes.

inalbansal
Автор

awesome tutorial!!, few questions:
1) What if the api return an array of objects [], how you can handle it generically?
2) some api server has some payload data too when there is an error occurred? like jwt error, 401 and so on, how do you handle this error with some payload from the server? because we may want to display the server error message too. Thanks

EmanNollase
Автор

Any chance of a concurrency version of this video?

shivaskanthan