Summary

We started this chapter with an overview of background fetch, how it works, and how it benefits your users. You learned about the prerequisites and best practices with regard to this feature. After establishing this basic understanding, you learned how background fetch works in concert with your application. Then, we continued to implement the required permissions and asking iOS to wake up the FamilyMovies application periodically so we can update the movie's ratings.

Once we did this, we needed to refactor a good portion of our application to accommodate the new feature. It's important to be able to recognize scenarios where refactoring is a good idea, especially if it enables a smooth implementation of a feature later on. It also demonstrates that you don't have to think about every possible scenario for your code every time you'll implement a feature.

After refactoring our application, we were finally able to implement background fetching behavior. In order to do this, we glanced over dispatch groups and how they allow you to group an arbitrary amount of asynchronous work together and be notified when all of the tasks in a group are completed.

This chapter wraps up the CoreData section. In the following chapters, we will focus on app extensions and how they are used to create a richer user experience. The first extension we will look at is Spotlight. We'll use this extension to index the data from the FamilyMovies application so we can find our family members and their favorite movies through spotlight.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.191.192.59