Abstract

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 NSData instance is as easy as calling UIImage imageWithData: and UIImagePNGRepresentation—in other cases, you may find your code sprinkled with logic to transform raw data to usable data in various places. Wouldn’t it be nice to have Core Data do this transformation work for you?

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.