Faking an API Server with URLProtocols

Episode #471 | 19 minutes | published on January 7, 2021 | Uses Xcode-12.3, Swift-5.3
Subscribers Only
Imagine you're building an app that will consume an API, however the API is not ready yet. The server team has given you some sample responses as JSON files you can use to start working against. In this episode we'll examine a useful technique of registering a custom URLProtocol for intercepting and handling network requests. We can use this fake server to continue building out our network infrastructure without being dependent on the backend API.

Episode Links

blog comments powered by Disqus