Trade-offs of Persistence Mechanisms

At this point, you can start thinking about the trade-offs between the common ways that iOS applications can store their data. Which is best for your application? Use Table 23.1 to help you decide.

Table 23.1  Data storage pros and cons

Technique Pros Cons
Archiving Allows ordered relationships (arrays, not sets). Easy to deal with versioning. Reads all the objects in (no faulting). No incremental updates.
Web Service Makes it easy to share data with other devices and applications. Requires a server and a connection to the Internet.
Core Data Lazy fetches by default. Incremental updates. Versioning is awkward (but can certainly be done using an NSModelMapping). No real ordering ...

Get iOS Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.