Caching anything in iOS

In a world filled with JSON fetching apps, caching is king.

Most iOS apps are asking a server for some JSON data, transforming it and present it nicely to the user. Caching these JSON responses can be achieved with headers and the built in functionality in URLSession.

Recently, I faced a problem that I needed to cache the request instead of the response. I needed to store upload files in the background and enable the system to restore the file and information.

Turning to Protocols… 🙄 here…

--

--

Stories and technical tips about building apps for iOS, Apple Watch, and iPad/iPhone

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Raul Riera

Raul Riera

Software Engineer, I make things so you don’t have to. More at https://raulriera.com