In order to view this lesson, you must purchase this course.
In this lesson, we will learn how to update the UI after we create all of our Companies in core data by using DispatchQueue.main to get back on the main thread. Next we move onto updating our Company objects on a background thread which is much trickier.
To perform this correctly, we are forced to reset our context on the main thread so that we can refetch everything. However, this is incredibly inefficient since we don't want to get everything again if we're just making a small set of changes. In the next lesson, we examine how we can set up relationships on our contexts so that we can merge changes automatically.