Mastering iOS CoreData with Swift
4.4 (78 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.
581 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Mastering iOS CoreData with Swift to your Wishlist.

Add to Wishlist

Mastering iOS CoreData with Swift

Unleash the power of Core Data on your iOS application combined with iCloud
4.4 (78 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.
581 students enrolled
Created by Andi Setiyadi
Last updated 3/2016
English
Current price: $10 Original price: $45 Discount: 78% off
5 hours left at this price!
30-Day Money-Back Guarantee
Includes:
  • 5.5 hours on-demand video
  • 21 Articles
  • 47 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Understand how Core Data data model and persistence work
  • Utilize fetching strategy on the application
  • Sync Core Data store to iCloud
  • Analyze Core Data performance
  • Know how to migrate from current data model to the new data model to adapt the business growth opportunity
  • Apply best practices in implementing Core Data in iOS application
View Curriculum
Requirements
  • Mac OS X
  • Xcode 7
  • If you want to test in a device, preferably it is running iOS 8+. On the iCloud Sync section, if you would like to follow along, a device running iOS 8+ (preferably iOS 9) is needed.
Description

MASTERING IOS CORE DATA WITH SWIFT

==============================================

***** Created with Xcode 7.2 and Swift 2.1 *****

Published: January 2016

==============================================

What is Core Data? Why should I know about Core Data?

Core Data is one of the most powerful framework that Apple has provided for developer. "Core Data is a framework that you use to manage the model layer objects in your application. It provides generalized and automated solutions to common tasks associated with object life cycle and object graph management, including persistence." - Source from Apple".

If you are passionate about learning mobile development for iOS and looking to take your iOS development skills to the next level, Core Data framework should be at the top of your list.

By the time you are done with Mastering iOS Core Data with Swift course, you will be ready and very confident to take on any Core Data project coming your way. On top of that, you will be one step closer to become a well rounded iOS developer.


What's in it for me?

In this course I will take you on a journey in the world of Core Data. We will cover all the important aspects of Core Data:

  • Entity
  • Attribute Type
  • Relationships
  • ManagedObjectContext
  • ManagedObject
  • PersistenceStore
  • PersistenceStoreCoordinator
  • Handling JSON data
  • Handling plist data
  • Predicate
  • CompoundPredicate
  • Fetching
  • Batch Fetching and Update
  • Object Deletion
  • Asynchronous Fetching
  • NSFetchedResultsController
  • Aggregate Functions
  • Grouping
  • Caching
  • Performance Tuning and Best Practices
  • Data Model Versioning
  • Lightweight Migration
  • Manual Migration with Model Mapping
  • iCloud Synching

Throughout this course we will look in detail the Core Data framework to provide data storage functionality in iOS applications. We will start by creating a simple app that is utilizing Core Data framework, building our own Core Data stack and eventually using all different Core Data features into our application.

Perfomance Tuning and Best Practices

We will cover the various ways on fetching our data and how to efficiently using Core Data in our app. Unit testing and performance tuning will be an important part on how we can monitor our app performance in conjunction with Core Data in our application.

Along with Core Data versioning, migration and iCloud integration, I will take you on developing 5 iOS applications and how we can integrate all of these components into Core Data.

Do at your own pace

Lots of students have different methods of learning. Through out this course I will provide both the starter and final Xcode project solution, so you can either follow along one step at a time or you can jump directly to the final solution. And by the end of this Mastering iOS Core Data with Swift course, you should be comfortable and ready to integrate Core Data framework in your application.

Target Audience: All iOS developer that would like to take their skills to the next level.

What are the requirements?

  • A Mac laptop or iMac
  • Xcode 7.x
  • Some knowledge of Swift development
Who is the target audience?
  • This course is meant for iOS developer who knows the basic of Swift development and would like to learn Core Data framework.
  • All iOS developer should know about CoreData. It is one of the most powerful framework provided by Apple.
Students Who Viewed This Course Also Viewed
Curriculum For This Course
52 Lectures
05:33:34
+
WELCOME TO THE COURSE
2 Lectures 06:07

This lecture will outline what will be covered in the Mastering iOS Core Data with Swift course. It will display the goals that students will accomplish by the end of this Core Data course by becoming a more well rounded Swift iOS developer and the readiness to tackle Core Data projects.

Preview 02:47

This lecture addresses some of the questions that may come up prior to students taking the Mastering iOS Core Data with Swift course.

Preview 03:20
+
INTRODUCTION TO CORE DATA
6 Lectures 31:28

This lecture introduces Core Data concept for the first time. It starts by creating a new Core Data project using a Single View Application then it will take users to steps on creating a Grocery List application.

Grocery List App
12:43

Final solution source codes based on lecture #3.

Grocery List App (Xcode Project - Final)
00:04

In this lectures students start creating Entity for the data store. It will introduce the Core Data concept using KVC (key-value coding) approach. By the end of this lecture, students will be able to create Core Data application by storing and retrieving the data using key - value approach.

Core Data with Key - Value
12:20

Final solution source codes based on lecture #5.

Core Data with Key - Value (Xcode Project - Final)
00:04

This is the first of many major steps in Mastering iOS Core Data with Swift course. In this lecture students will start subclassing the Entities from the data model to create Swift objects to represent the entities. This allows Xcode to provide code completion using dot notation to access our objects instead of using key - value approach.

Preview 06:12

Final solution source codes based on lecture #7.

Core Data with NSManagedObject Subclass (Xcode Project - Final)
00:05
+
CORE DATA - DEEP DIVE
28 Lectures 03:15:53

This lecture will cover how to extract Core Data stack out of AppDelegate. Students will create a regular Single View Application without checking the option for Core Data during the project creation, and instead will work toward building the Core Data stack manually as a separate Swift file.

Core Data Stack
14:10

Final solution source codes based on lecture #9.

Core Data Stack (Xcode Project - Final)
00:04

This lecture introduces how to set the Entity and Relationships. It also shows different data types available in Core Data that can be assigned to Attributes, such as String, Integer 16, Double, Binary Data. Students will learn about the concept of one-to-one and one-to-many relationships, how to check the relationships on the entity diagram and learn how Xcode will map the data type from the data model to Swift class.

Preview 08:38

Final solution source codes based on lecture #11.

Entity Relationship (Xcode Project - Final)
00:05

In this lecture, we will see how we can capture the data from JSON file and upload the data to the Core Data store.

JSON Data and Dictionary
19:36

Final solution source codes based on lecture #13.

JSON Data and Dictionary (Xcode Project - Final)
00:04

In this lecture we will see alternative source of sample data using plist.

Alternative: Handling pList sample data
04:34

In this lecture we will start utilizing the Core Data stack that we build on the previous lecture. We will look into how we can initialize the Core Data and managedObjectContext in the AppDelegate and pass them to the view controllers. This will allow a single instance of Core Data stack distributed for the entire application. This is in preparation of start using Core Data predicate in the part 2 of this Predicate topic.

Predicate - Part 1
13:05

In this lecture we start diving in building the request object and using predicate to set the search criteria. We will look into the following topic:

  • Set search criteria using key path condition
  • Execute request object to invoke Core Data store
  • Handle the search results
  • Load data based on on query execution
Predicate - Part 2
10:15

Final solution source codes based on lecture #16 and #17.

Predicate (Xcode Project - Final)
00:04

In this lecture we are introducing Core Data sorting functionality. We will be working on filter and sort functions of the Home Report app and how to update the records in table view using protocol-delegate approach based on the sort and filter options selected by end users.

CompoundPredicate and Sorting - Part 1
15:39

We are introducing CompoundPredicate to handle multiple criteria when submitting a query to Core Data. We will use CompoundPredicate and SortDescriptor to build the request object.

CompoundPredicate and Sorting - Part 2
07:02

Final solution source codes based on lecture #19 and #20.

CompoundPredicate and Sorting (Xcode Project - Final)
00:04

This lecture shows how to utilize Core Data aggregate function "SUM" and "COUNT". It demonstrates the use of DictionaryResultType, CountResultType and CountForFetchRequest. It also shows how to build the expression description into the request object to execute Core Data aggregate functions.

Aggregate Function - Part 1
14:36

On this second part of Aggregate function lectures, we will look into using Core Data MIN, MAX and AVERAGE aggregate functions.

Aggregate Function - Part 2
11:45

Final solution source codes based on lecture #22 and #23.

Aggregate Function (Xcode Project - Final)
00:02

This lecture introduces asynchronous fetching in Core Data using NSAsynchronousFetchRequest and how to handle the response in completion handler.

Asynchronous Fetching
04:38

Final solution source codes based on lecture #25.

Asynchronous Fetching (Xcode Project - Final)
00:04

This lecture will look into detail how the one to many relationship between entities, translated into code implementation.

One To Many Implementation
29:17

Final solution source codes based on lecture #27

One To Many Implementation (Xcode Project - Final)
00:02

In this lecture we will create a new app called My Movie. We will demonstrate how to use NSFetchedResultsController to fetch data from Core Data store. NSFetchedResultsController is created to support tableview in mind so it is a perfect fetching approach when we are using UITableViewController. We will look into more detail why this fetching strategy brings benefit to display and update data in the tableview on the subsequent lectures.

NSFetchedResultsController
13:20

Final solution source codes based on lecture #29.

NSFetchedResultsController (Xcode Project - Final)
00:04

This lecture demonstrates how to delete a record from our Core Data data store by utilizing NSFetchedResultsController to perform the object deletion. It shows how effectively NSFetchedResultsController handles the update for tableview datasource without the need to manually reload the data.

Delete Objects
13:29

Final solution source codes based on lecture #31.

Delete Objects (Xcode Project - Final)
00:04

We will look into updating multiple records with one batch request. One hidden challenge on this lecture is to update the view after the batch update request is executed. To address this, we will look to fault object and how we can get the object out of it and update the state of the object. We will also learn how to prevent the cache data being used instead of the updated object state.

Batch Update
11:35

Final solution source codes based on lecture #33.

Batch Update (Xcode Project - Final)
00:04

This lecture will show how to group and cache the results from Core Data store by leveraging the attributes within NSFetchedResultsController.

Group and Cache
03:26

Final solution source codes based on lecture #35.

Group and Cache (Xcode Project - Final)
00:04
+
PERFORMANCE TUNING
6 Lectures 37:59

This lecture will introduce us to Xcode Memory Debugging and Core Data Profiler. We will inspect the application memory footprint and how the different approach of Core Data implementation can impact the performance of our application. We will look into how to efficiently deal with large images and how to use thumbnail when necessary will bring performance impact to the application.

Dealing with Large Images
13:22

Final solution source codes based on lecture #37.

Dealing with Large Images (Xcode Project - Final)
00:04

We are going to implement batch size fetching to limit the number of records requested from Core Data store to improve the application performance. It is on demand fetching.

Preview 05:40

Final solution source codes based on lecture #39.

Batch Size Fetching (Xcode Project - Final)
00:04

We are going to implement different fetching strategy to improve our application performance. We will be using unit testing to compare the application performance on before and after tuning up our codes.

Selective and Priority Fetching
18:45

Final solution source codes based on lecture #41.

Selective and Priority Fetching (Xcode Project - Final)
00:04
+
MODEL VERSION AND DATA MIGRATION
5 Lectures 39:04

Core Data lightweight migration is the easiest of migrating our data model. We will look at how easy to initiate a lightweight migration as well as versioning our data model.

Preview 11:07

Final solution source codes based on lecture #43.

Model Version and Lightweight Migration (Xcode Project - Final)
00:04

This is the first part of manual migration topic. We are going to refactor our data model entities, attributes and relationships. We will create our new mapping model and learn how to manually map the old entities, attributes and relationships to the new data model.

Manual Migration with Mapping Model Part 1
14:02

This is the second part of manual migration topic. We are going to update our codes to reflect the new data model that we created on the first part.

Manual Migration with Mapping Model Part 2
13:47

Final solution source codes based on lecture #45 and #46.

Manual Migration with Mapping Model Part 2 (Xcode Project - Final)
00:04
+
ICLOUD INTEGRATION
4 Lectures 21:50

A walkthrough on how to sign up for Apple Developer Program.

How to enroll to Apple Developer Program?
04:11

A walkthrough to create an iCloud test account in iTunesConnect.

How to create iTunes test account?
03:36

In this lecture we are going to setup an iCloud sync for our Core Data store. We will look into:

  • how to enable iCloud in our application
  • how to check AppId in Apple Developer member center
  • how to setup notification observer
  • how to use iCloud test account for our testing
  • how to perform testing using a real device and simulator.
iCloud Sync
13:59

Final solution source codes based on lecture #50.

iCloud Sync (Xcode Project - Final)
00:04
+
WHERE DO I GO FROM HERE?
1 Lecture 01:13

This is not the end of the road. Set your brand new and shiny skills to work on your next Core Data projects.

What's next?
01:13
About the Instructor
Andi Setiyadi
4.5 Average rating
293 Reviews
1,653 Students
6 Courses
Senior Web and Mobile Developer

Hi! I am Andi. I have a degree in MS Information Systems and been working for a Fortune Top 25 Company for the last few years.

I am passionate about mobile development and have been using both the hybrid and native approach on my projects. I fell in love with Swift and been part of the early adopter. I truly believe Swift will become one of the development languages of the future.

I live in beautiful state of Colorado in the United States and while I am not busy coding, I enjoy biking and skiing.

My motto is never stop learning and share the knowledge. Having said that, I am ready to take you on the journey of Swift development world and hope you will be a part of it.