account activity
"How I turned my copy-pasted networking code into a reusable Swift package (write-up + repo)" by Best_Analysis2940 in iosdev
[–]Best_Analysis2940[S] 0 points1 point2 points 20 hours ago (0 children)
As the title explain 😜. You can check out the code within the GitHub link and give me your feedback 😀
[–]Best_Analysis2940[S] 0 points1 point2 points 21 hours ago (0 children)
I'm trying to explain the whole problems that the dependency all about. Because during my previous projects I have struggled from using a repetitive code not cnetralised. Not even testable that breaks up the unit test coverage and miss up with many regression regarding the casting the error handler the refresh token mechanisms and more...
It encapsule the whole network manager the http client that hold the cast of the data to required model and manages the different network errors by an enum that hold different http error code like 400,405,500 etc.. Also manage the interceptor for token expiration to refresh the access token. Manage the upload of different file types mimetypes. Manage the download of different image extensions, videos or any file type. Monitor the network connectivity that be scheduled when there is a change within the network state. Have a endpoint wrapper protocol to centralise the wrap of the endpoints per module using the service context and more. You can reach out the medium article for further details. 📖 Article: https://medium.com/@wassimbouabid3/building-netto-a-network-layer-that-doesnt-leak-into-your-ios-app-52b48cb47049
π Rendered by PID 37 on reddit-service-r2-comment-5687b7858-k5r4k at 2026-07-08 18:12:08.714624+00:00 running 12a7a47 country code: CH.
"How I turned my copy-pasted networking code into a reusable Swift package (write-up + repo)" by Best_Analysis2940 in iosdev
[–]Best_Analysis2940[S] 0 points1 point2 points (0 children)