Pages: 238
Published: June 2016
ISBN: 9781680501230
In Print
Core Data is Apple’s data storage framework: it’s powerful, built-in, and can integrate with iCloud. Discover all of Core Data’s powerful capabilities, learn fundamental principles including thread and memory management, and add Core Data to both your iOS and OS X projects. All examples in this edition are written in Objective-C and are based on OS X El Capitan and iOS 9.
Check out Core Data in Swift here.PDF for desktop/tablets
epub for Apple Books, e-readers
mobi for Kindle readers
Get all eBook formats here for $26.95 (USD)
Order via Bookshop (U.S. Only)
Please support indie bookstores!
Find indie bookstores in the U.S. Find indie bookstores around the world.
Core Data expert Marcus Zarra walks you through a fully developed application based around the Core Data APIs. You’ll build on this application throughout the book, learning key Core Data principles such as NSPredicate, NSFetchRequest, thread management, and memory management.
Start with the basics of Core Data and learn how to use it to develop
your application. Then delve deep into the API details. Explore how to
get Core Data integrated into your application properly, and work with
this flexible API to create convenience methods to improve your
application’s maintainability. Reduce your migration difficulties,
integrate your Core Data app with
iCloud, and use Core Data in a queue-based environment. By the end of
the book, you’ll have built a full-featured application, gained a
complete understanding of Core Data, and learned how to integrate your
application into the iPhone/iPad platform.
This third edition updates all examples for OS X El Capitan and iOS 9, and gets you up to speed on changes in multithreading and batch processing. There’s a new chapter on efficiently importing data from a network location, and a new discussion of how best to pre-load data into your application.
In a multi-threaded environment, always turn on the
-com.apple.CoreData.ConcurrencyDebug 1
setting when you are
running in debug mode. This will catch threading errors during
development.
Only use one NSManagedObjectContext
for your entire User
Interface. The User Interface is designed to run on a single thread
and therefore using additional NSManagedObjectContext
instances is
unnecessary and creates problems.
If you are using the parent/child design with Core Data, do not try
and reuse child NSManagedObjectContext
instances. They are cheap
and meant to be thrown away after a single use.
Every time you ship your application with a model change, tag that commit in your version control system so that if the model accidentally gets altered you can quickly find the original.
Every “error” that Core Data can potentially produce is a developer preventable error. If you treat them as hard errors (with a call to abort, for example) you will be able to test for them more easily and your error handling code becomes far less complex.
Releases:
PDF for desktop/tablets
epub for Apple Books, e-readers
mobi for Kindle readers
Get all eBook formats here for $26.95 (USD)
Order via Bookshop (U.S. Only)
Please support indie bookstores!
Find indie bookstores in the U.S. Find indie bookstores around the world.
Pages: 238
Published: June 2016
ISBN: 9781680501230
Edition: 1
In Print