O'Reilly logo

Mastering iOS 10 Programming by Donny Wals

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9.  Storing and Querying Data in Core Data

Now that you know what Core Data is, how it works, and how you can integrate it in your application, the time is right to figure out how to store and query data with it. Setting up the store was fairly straightforward, especially with the new NSPersistentContainer that was introduced in iOS 10.

Handling actual data is a bit more complex since we might have to deal with things, such as multithreading or objects, that suddenly get updated while we've just read them from the database. Dealing with databases isn't easy, especially if you're trying to ensure data integrity. Luckily for us, Core Data helps tremendously with that.

In this chapter, we will insert some pieces of data into our database and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required