iOS and CoreData: Create Data Driven Apps with Swift 3

Use the mighty Core Data framework to improve your apps and make your life easier
4.7 (72 ratings)
Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
516 students enrolled
80% off
Take This Course
  • Lectures 45
  • Length 4 hours
  • Skill Level Intermediate Level
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works


Find online courses made by experts from around the world.


Take your courses with you and learn anywhere, anytime.


Learn and practice real-world skills and achieve your goals.

About This Course

Published 5/2016 English

Course Description

If you have never worked with Core Data before, this mighty framework can seem a little intimidating. But the fact is, once you understood the basics of the Core Data framework you will hardly believe that there was a time when you didn't want to use it. 

In this course you will learn exactly as much theory about databases as you need to get started with building your own data models with Xcode and Core Data. You are going to learn why relationships not only matter in real life, but also when talking about structuring data in your apps. You will learn all about the benefits that come with using Core Data and then put them into practice in easy examples. 

After learning all the necessary basics regarding Core Data, you will create a complex app that will combine everything you have learned so far. Creating this app will give you insights into other advanced iOS development techniques. 

What are the requirements?

  • You should be familiar with the basics of the Swift programming language
  • You should have a basic understanding of the Xcode IDE

What am I going to get from this course?

  • build a Core Data driven iOS App from start to finish
  • understand the advantages of a Core Data
  • creating data models
  • using relationships
  • integrate Core Data in real Apps
  • using the NSFetchedResultsController
  • using NSPredicate to search a database
  • using Sort Descriptors
  • use advanced iOS development techniques

Who is the target audience?

  • You should take this course if you want to bring your data driven application to the next level.
  • You should also take this course if you want to use one of the most advanced iOS frameworks to make your life a lot easier when it comes to save data locally or on iCloud.
  • This course requires a basic understanding of the Swift programming language and the Xcode IDE. This course is probably not for you if you're completely new to iOS development.

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.


Section 1: Welcome

See how to use this course to fit your needs.


Get to know our demo application and see what you will have created at the end of this course.


You can store data in different ways. Learn about advantages and disadvantages of different approaches.

Section 2: All the Basics You Need

Learn what Core Data is and why it's not really a database but an object relational mapper.


See how Core Data works seamlessly together with Xcode and learn about the concept of data models.


The core of every data model are its entities and their attributes. In this video you are going to learn how to add them to your own data model.


Relationships are not only important in real life. In this video you are going to learn how relationships work and why they are vital when it comes to structuring data.


Create your first relationships with Xcode.


After watching this video you will be able to setup the heart of every Core Data driven application: the Core Data Stack.


This is an older version of this video that illustrates how complicated it used to be to create a core data stack

Section 3: Saving, Searching and Filtering

The NSManagedObject is our best friend when it comes to dealing with records from our database.


Finally, you are going to save data to your Database.


In this video you are going to learn how to get data out of your database and display information.


To present data to your users, you often have to give it structure first. In this video you are going to use the NSSortDescriptor class to sort data in an efficient way.


Often, you don't want to retrieve every single record from your database. NSPredicates allow you to select exactly what information you want to get from your database.

Section 4: Relationships, Advanced Sorting and Complex Predicates

Relationships are a powerful tool. In this video you will learn how easy it is to add notes to a notebook and thereby leverage our one-to-many relationship.


After completing this video you can access the records behind a to-many relationship.


To present your users with an ordered set of data, this video shows you how to sort items with little effort.


Especially together with Core Data, key-value-coding is a powerful technique to access data fast.

Section 5: The Mighty NSFetchedResultsController

In this video we are going to fulfil the necessary requirements to use the NSFetchedResultsController.


Using The NSFetchedResultsController is based on some very powerful delegate methods that we are going to implement in this video.

Section 6: Change Database Records

It is very easy to update existing records in a Core Data database. In this video you learn how to do that with just a few lines of code.


Deleting is just as easy as changing existing records. See how to delete objects in this video.

[NEW] Handle Updates with NSFetchedResultsController
Section 7: Putting it All Together: Borrowmatic

Let's start creating Borrowmatic by creating a Xcode project using a Master Detail Application template.


In this video we are going to set up the Storyboard and Autolayout to set some constraints for our app to run on different devices.


In this video we are going to add our entities, attributes and define some relationships. 


In this video we prepare the user interface for adding our first items to the database.


In addition to adding the code to create a new borrow item we will also make some adjustments to the OverviewViewController


To display borrow items we need to make some adjustments to the NSFetchedResultsController


To transfer data from the OverviewViewController to the ItemViewController, we need to use Segues. 


Borrow items and persons have image attributes. To fill them with data we need to be able to access the photo library. In this video we will also deal with adding images to the user interface.


This video deals with saving images as NSData objects and how to display them on the user interface again.


To select a timeframe for a borrow item we need to add a new ViewController to our Storyboard. Also we are going to add a 3rd party library called GLCalendarView to make selecting data ranges easier.


In this video we are going to add a new protocol to the Timeframe ViewController. This will allow us to transfer the selected timeframe back to the DetailViewController.


As we did with the title of a borrow item and with associated images, we will now add and retrieve timeframes to and from our database. 


Using our one-to-many relationship between borrow items and persons we will now associate persons with borrow items.


To make it even easier to select already existing persons, we will add an auto completion feature for the user to easily select a person that is already saved to the database. 


In this video we are going to reactivate some of NSFetchedResultsControllers template code to manage updates in the database really quickly.


We will now fill the segmented control we created at the beginning of this section with life. Users will now be able to choose between sorting by date and sorting by person.


In this video we are going to add a 3rd party control to our project that will allow us to select timeframes very easily.

Section 8: Core Data iCloud Support [Deprecated without replacement by Apple]

To use iCloud in any application you need to configure your AppID and change some settings in Xcode. Thats what we are going to do in this video.


Enabling iCloud for CoreData is easy. In this video we make the proper modifications in our CoreDataStack.


Once iCloud for CoreData is enabled, we need to listen for specific notifications that tell our application when to update the user interface.

Section 9: Conclusion and Course Material

You are now a Core Data Expert. But there is still something for us to do.

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Brian Advent, iOS Developer and Trainer

I wrote my first line of code at the age of 10 by creating the simplest form of a Hello World Application within the Visual Basic Editor of Microsoft Word. For many years, programming was completely about the journey for me.

Starting off with Visual Basic and earning money by creating Access Databases for many clients was nice, but not the driving force behind my wish to know more about creating software.

After switching to the Mac, I started developing with Java, C++, and later ActionScript 3.0. After school I used my expertise in different scientifically used big data applications. My work was all about visualisation of large amounts of data and therefore creating the best user experience possible.

Although I do love programming, I chose a different path for my professional carrier. By becoming an educator I could follow my second passion which is sharing knowledge. Today and especially since the release of the iPhone SDK in 2008 my interest in programming mainly is focused on creating iOS Apps for educational use and finding ways to create software that can be used in classroom, at universities and by students themselves to make learning a great experience. Although my passion lies in educational software, I am also doing client work from time to time, which does not only include the development of iOS Applications but also the implementation of different iOS development trainings.

Ready to start learning?
Take This Course