dating jars Core data updating records

To keep the example simple our data model will have one entity with two attributes.

A Person with name and age: Person -name: “Create NSManaged Object Subclass…”.

It should create a class and an extension representing our entity “Person”.

When the project has Core Data Xcode add a bunch of code to our App Delegate.swift.

A piece of that code is the managed Object Context.

This is the object that we need to access the data model.

This post is part of my collection: Swift 2 – For Beginners.

Core Data is a persistence framework provided by Apple.

In this example we will see how to use it in our i OS application.

First we will see how to create our data model and then how to perform the following basic operations: A data model consist of a group of entities.

The concept of entity in Core Data is similar to the concept of table in SQL.

Each entity can have attributes in the same way that a table can have columns.

To create a new entity you need a project with Core Data included.

Then go to your xdatamodel file and click “Add Entity”, “Add Attribute” to configure it.