O'Reilly logo

Mastering iOS 10 Programming by Donny Wals

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Updating movies in the background

We have almost all of the building blocks required to update movies in the background in place. All we need now is a way to fetch movies from the movie database using their remote ID instead of using the movie database search API.

In order to enable this way of querying movies, another fetch method is required. The simplest way to do this would be to copy and paste both the fetch and URL building methods and adjust them to enable fetching movies by ID. This isn't the best idea; if we add another fetch method or require more flexibility later, we will be in trouble. It's much better to refactor this into a more flexible format right away.

Preparing the helper struct

In order to maintain a clear overview of the available ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required