In Part 1 of this tutorial, we set up a simple UIDocument-based class that will save and read an array of objects containing names and birthdays. We also set up a pair of unit tests that verified that we could, indeed, read and write using this class. In particular, the unit tests were designed to handle the fact that UIDocument uses Grand Central Dispatch (GCD) to do some of the I/O in a background thread.
In the second part of this tutorial, we’re going to “harden” the UIDocument class so that it tolerates various things that might go wrong, as well as provide us more information about the process of loading data.