How to create a Generic Networking Layer in iOS apps (Refresh Tokens, Combine, Async/Await, SwiftUI)

  Рет қаралды 82,515

Essential Developer

Essential Developer

Күн бұрын

Пікірлер: 24
@EssentialDeveloper
@EssentialDeveloper Жыл бұрын
Sign up to gain FREE access to exclusive iOS dev courses, workshops, and mentoring sessions: www.essentialdeveloper.com/community?
@sebastiankubiak7874
@sebastiankubiak7874 Жыл бұрын
😊😊😊😊
@Joao-nn6gn
@Joao-nn6gn 9 ай бұрын
Not only impressed by the tecnical content, but with how good Caio is in capture what the student is struggleing with
@mistymu8154
@mistymu8154 Жыл бұрын
This is one of the best videos I have watched on this topic. I have coupled the HTTP part and the decoding part so many times. As you point out, it quickly becomes a mess with a bunch of different if statements to handle different APIs and things like an empty 204 or a 307 redirect which either do not return JSON or a different JSON than a 200 response.
@maciusessa
@maciusessa 6 ай бұрын
Daaaaaamn... Outstanding video. Needed that in my project. Great. Thanks a lot! :D
@shreyshrivastava8551
@shreyshrivastava8551 Жыл бұрын
We use both async await and Combine. If developer wants publisher, he can wrap the response in a publisher and send it forward.
@incelemeTRe
@incelemeTRe Жыл бұрын
Thank you for this excellent session!
@EssentialDeveloper
@EssentialDeveloper Жыл бұрын
Glad you enjoyed it!
@IamCutePanda
@IamCutePanda 8 ай бұрын
could you please assessed my project and close some " grey spots " I am trying to reach a junior position ( Swift UI ) dev!
@dineshvijaykumar4237
@dineshvijaykumar4237 Жыл бұрын
In terms of the API Mappers, what would we do if our custom mapper still included functionality from the generic one? Would we duplicate the code over to the specialised mapper or is there a way to combine both mappers?
@EssentialDeveloper
@EssentialDeveloper Жыл бұрын
Hi! You could extract it into another function and share it between the mappers.
@joshkinney4895
@joshkinney4895 8 ай бұрын
If you were to create a new app (mainly uikit very little swiftui) would you avoid Alomofire? Why?
@EssentialDeveloper
@EssentialDeveloper 8 ай бұрын
Hi! Yes, we'd avoid it because the less 3rd-party dependencies, the easier it is to maintain a project long-term. In our opinion, Alamofire doesn't provide enough benefits to justify the maintenance cost/risk.
@pavlobudzynskyi9739
@pavlobudzynskyi9739 Жыл бұрын
1 thing I'm not seeing in this video is how do we implement retry logic after the token is refreshed and avoid multiple refresh requests at the same time
@EssentialDeveloper
@EssentialDeveloper Жыл бұрын
Hi Pavlo. We showed it in this other session: www.essentialdeveloper.com/articles/how-to-refresh-auth-tokens-correctly-using-swift-async-await-actors-live-dev-mentoring
@pavlobudzynskyi9739
@pavlobudzynskyi9739 Жыл бұрын
@@EssentialDeveloper thanks for the response, but unfortunately it's no longer publicly available. Maybe some day :)
@suryabhan1000
@suryabhan1000 Жыл бұрын
@@EssentialDeveloper actually this video is not publically available. could you?
@EssentialDeveloper
@EssentialDeveloper Жыл бұрын
Hi @suryabhan1000, this video is not publicly available anymore. Only students of the iOS Lead Essentials have access to it now. Check it out if you're interested: iosacademy.essentialdeveloper.com/p/ios-lead-essentials/
@divakukulza
@divakukulza Жыл бұрын
00:52:23 favorite part 01;07;34
@sunshine_279
@sunshine_279 Жыл бұрын
Hey, the app is crashing when we click on "Alternative login for developers" button. *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'The specified URL has an unsupported scheme. Only HTTP and HTTPS URLs are supported.' *** Can you please help? also can the given code directly be used? I have same functions and flow to implement... auth token, refresh token. I have to use Async/await. Please reply
@EssentialDeveloper
@EssentialDeveloper Жыл бұрын
Hi! This is not our project. We didn't write the code and we don't recommend using it directly. The goal is to watch the session and learn by using the project to practice along ✅
@dubstepwawawa
@dubstepwawawa Жыл бұрын
Where we can find sample code?
@EssentialDeveloper
@EssentialDeveloper Жыл бұрын
Hi! The link is in the video description.
@Contreras04
@Contreras04 8 ай бұрын
wow... I have been doing it wrong all my life
Quando eu quero Sushi (sem desperdiçar) 🍣
00:26
Los Wagners
Рет қаралды 15 МЛН
BAYGUYSTAN | 1 СЕРИЯ | bayGUYS
36:55
bayGUYS
Рет қаралды 1,9 МЛН
Swift API Calls for Beginners (Networking) - Async Await & JSON
25:35
Testing & CI for GenAI
1:02:43
Helix
Рет қаралды 20
DC iOS: SwiftUI Architecture and Best Practices
1:15:19
Dev Community
Рет қаралды 24 М.
🐙 Lunch & Learn: AI Fundamentals for 2025
1:20:35
Tina Huang
Рет қаралды 6 М.
3 MISTAKES to avoid when using Async / Await in Swift 😌
4:41
Vincent Pradeilles
Рет қаралды 12 М.
Implementing Generic Networking Layer in Swift
20:07
azamsharp
Рет қаралды 8 М.
What if artificial intelligence surpasses human intelligence?
23:34