How to Stub URLSession Responses… or Die Trying

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…