How to Stub URLSession Responses… or Die Trying
Posted 3 days, 4 hours ago.
The internet is filled to the brim with the gravestones of attempts to stub URLSession
responses. As something of a strange holdover from the Objective-C days, URLSession
is notoriously hard to penetrate with stubbing approaches.
You might think “It’s not a final
class, I’ll just subclass and override the methods I care about” but the moment you do, you’re already in a world of pain. Many of the methods you’re probably using these days can’t be overridden directly, because they’re defined in extensions. Even if you do manage it, the sneaky static factory methods in disguise as initialisers will beat you down until you find yourself sobbing in the fetal position.
And then you discover URLProtocol
. It promises you the world, allowing you to inject your own logic in response to any request, but when using it for unit testing, it comes at a cost.
What is that cost?
I’m glad you asked.
Relay for St. Jude 2025
Posted 4 weeks, 2 days ago.
If you’ve paid any attention to my nonsense over the past couple of years, you may already know that I’ve been making art for my friends at Relay, Myke Hurley and Stephen Hackett, who spend the month of September hosting an epic fundraiser for the fine folk at St. Jude Children’s Hospital.

This year is no different… except that it totally is.
The Hunt for a Better Search
Posted 34 weeks, 1 day ago.
It was all Twitter’s fault.
To be clear, I don’t mean the version owned by the over-confident billionaire. It started well before that. The service had always been a minefield to work with. GIFwrapped had users that really wanted to be able to download GIFs from their timeline, but I’d never really managed to articulate my needs well enough to be granted API access.
So I had made do with grabbing the HTML source with a URLSession
and inferring as much as I could from there. Eventually, of course, that ended up breaking… almost as if Twitter never wanted people to have unrestricted access to its content in the first place.
For a few years, I just nailed on new features, workarounds for this issue and that one, until the architecture was a mess of code with wacky bolt-ons for dealing with Twitter’s nonsense. It had to be, because my customers demanded it.
At the end of 2022, it all came to a head, and I broke. I was constantly dealing with Twitter breaking the insane web of code, and I needed something better designed to be able to deal with its nonsense. Something extensible. Something I could use to run live tests way more easily.
That would allow me to validate whether my code was still working, and ideally stay ahead of issues, as opposed to playing catchup every time they deployed updates.
So I began to pull apart GIFwrapped’s search architecture, and rebuild it from scratch.
Tales of a Callsheet Icon
Posted 1 year, 13 weeks ago.
I was listening to Accidental Tech Podcast one day, and my good mate Casey Liss was chatting away about his upcoming app, Flookup. I don’t recall if he’d let anyone know what it was or what it was called at the time, but I was one of the lucky few who got a TestFlight build quite early on.
It was a great little app, even at that early stage, but the icon let a lot to be desired for me. Casey is many things. A great friend. An excellent developer. A half-decent podcaster. But an artist?

It’s no message bubble with feet, but the concept has hands.
So I found myself opening up Sketch and getting to work. Could I make an icon before the episode was done?
1Password Abandons the Robot
Posted 4 years, 5 weeks ago.

The internet is mad again, but maybe we should all remember the real victim here.