rootstrap / ios-base

Boilerplate for new iOS projects using Swift 5. Provides a handful of functionalities.
https://rootstrap.com/
MIT License
256 stars 63 forks source link

Refactor Networking layer - Implementation proposal #189

Closed glm4 closed 2 years ago

glm4 commented 2 years ago

Description:

The proposed soluction in terms of architecture and responsibilities is documented in the diagram below. This can be added later to the README file if needed.

I tested the existing functionalities with a mocked API due to the unavailability of the ios-bases-api heroku app. The Apiary docs can be found here.

iOS Base API Client


Risk:


glm4 commented 2 years ago

Looks great to me!

Just a flavor question, why are we switching to a a single completion callback instead of having both success and failure?

@germanStabile It is just to leverage the Swift.Result type where declarations become easier and shorter. This is not a mandatory requirement though, you could use 2 closures if you need.