r/iOSProgramming • u/Short_Holiday_3056 • Jun 22 '26
Discussion I built a Swift networking framework from scratch – would love your thoughts!
Hey everyone!
So I've been spending my free time building NexNet, a Swift networking framework built on async/await, and I finally feel good enough about it to share it here.
Honestly the motivation was simple — I wanted a networking layer that just gets out of your way. One fetch() call, no boilerplate, no third party libraries. Just clean Swift.
Here's what I packed into it:
- Single fetch() call handles GET, POST, PUT, PATCH and DELETE
- Both async/await and completion-handler APIs, identical in capability so you can use whatever fits your codebase
- Full Objective-C support with automatic NSError bridging
- 20 typed error cases covering every HTTP status code and network condition
- Auto JSON encoding/decoding with snake_case to camelCase conversion built in
- Exponential back-off retry with per-request cancellation tokens
- Thread-safe throughout, zero external dependencies
- cURL export on every request which has honestly been super useful for debugging with backend teammates
- Structured logging that routes to print in DEBUG and os_log in RELEASE automatically
- Works on iOS 15+, macOS 12+, tvOS 15+ and watchOS 8+, installable via Swift Package Manager
This is my first open source Swift package and I learned a ton building it — especially around concurrency and API design decisions that seem small but really aren't.
Would genuinely love to hear what you think. Harsh feedback totally welcome, that's how it gets better!