17Core Data
There are a few different approaches to saving and loading for iOS applications. When deciding between them, the first question is typically “Local or remote?” If you want to save data to a remote server, this is typically done with a web service. Web services are covered in Chapter 25, so let’s assume that you want to store data locally. The next question is typically “Archiving or Core Data?”
At the moment, Homepwner uses keyed archiving to save possession data to the filesystem. The biggest drawback to archiving is its all-or-nothing nature: to access anything in the archive, you must unarchive the entire file; to save any changes, you must rewrite the entire file. Core Data, on the other hand, can fetch a small subset of the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access