Chapter    7

Transforming and Encrypting Data

Although Core Data offers a reasonable array of supported data types, not all data fit neatly into strings, Booleans, numbers, and so on. Core Data offers a catch-all data type, Binary Data, that can store any type of binary data. We used a Binary Data type in Chapter 5, for example, to store images. Core Data marshals any data stored in a Binary Data type to and from an NSData instance. While this means that Core Data can store any kind of arbitrary data in a Binary Data column, it also means that your applications must transform NSData instances into representations useful to your application, and vice versa. While sometimes this may be trivial—with images, for example, creating an image from an ...

Get Pro iOS Persistence : Using Core Data 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.