Member-only story
URLSession to Electrons: How Networking works on iOS
A theoretical deep-dive into how the internet happens via your iPhone
Jacob Bartlett16 min read·Just now--
One of the reasons I reckon I’m a decent writer is that I can remember what it’s like to be very junior. Noob-y mistakes were my bread and butter. I hailed from the “no question is a stupid question” school of thought, and had zero filter when I felt blocked.
These traits combined to make me very annoying to Josh and Si, our resident seniors. My relentless requests for help were invariably met with some variant of:
- “You forgot to assign the UITableViewDataSource, didn’t you?”
- “You didn’t set translatesAutoresizingMaskIntoConstraints = false”
- “You have to call .resume() on that URLSessionDataTask”
This wistful nostalgia trip got me thinking.
What actually happens when you call .resume() on a URLSessionDataTask?
The subsequent rabbit hole is quite fascinating, and required reading if you never stopped to wonder how literally the entire internet works.
So today is a theory lesson + case study.
We’re covering the conceptual model underpinning the vast network of networks that make up the internet.