This is part of the "iOS Data and Networking" learning path. View Path

Beginning Core Data

Aug 25 2020 · Video Course (3 hrs, 36 mins) · Beginner

Learn the basics of Core Data in this beginner series. You’ll learn how to model your data with attributes and relationships, save data using a context, display saved data in lists and much more, in both SwiftUI and UIKit!

4.6/5 5 Ratings

Version

  • Swift 5.1, iOS 13, Xcode 11.3

The Core Data Stack

Introduction

3:31 Free

What is Core Data? Find out how it is used to store data in your apps.

1

Take a high level tour of the Core Data stack and understand what Core Data is and isn't.

2

Understand how Core Data represents an app's data model using managed objects

3

Core Data needs to keep track of changes to the managed object model and it does this using a managed object context. Get a high level understanding of how a context is used in this episode.

4

Understand how the persistent store coordinator facilitates communication between the context and underlying data store.

5

Create a Core Data stack for use in the Reminders app!

6

Conclusion

1:53

Wrap up this section by reviewing what you've learned about the Core Data stack, and find out what's coming up in the next section.

7

Saving and Fetching Reminders

Learn what an Entity is in the Core Data framework and how you can add attributes to model your data.

8

In this challenge complete the Reminder entity by adding attributes to define your data model

9

Understand what managed object subclasses are and how you can use them in code to represent your Core Data model.

10

Now that you have a Reminder class you can use learn how to populate it and save data to the persistent store.

11

Understand how to use @FetchRequest and associated types to display the saved Reminders in a list.

12

Learn how to sort fetched results by adding sort descriptors to your fetch requests.

13

Learn how to create predicates using NSPredicate to filter fetched results.

14

Understand how to create relationships between entities in your object graphs to make your data model richer.

15

Understand how to leverage the relationships in a model to display data without executing a fetch request.

16

Level up your knowledge of predicates by combining multiple using a compound predicate

17

In this challenge add functionality to add tags to Reminders by updating the data model.

18

In the second part of the challenge update the user interface to display the tags you added in the last challenge!

19

Understand how to use transient properties to add functionality to your managed objects

20

Conclusion

3:10

Wrap up this section by reviewing what you've learned about Core Data and SwiftUI, and find out what's coming up in the next section.

21

Core Data and UIKit

Understand the differences between using Core Data in UIKit versus SwiftUI.

22

In this video configure your project to pass the managed object context around so you can save data.

23

Understand what a fetched results controller is and how you can use it to fetch lists you have saved.

24

Learn how to use the fetched results controller's delegate to inform you of changes to the context and handle it appropriately.

25

In this challenge modernize the view controllers to use diffable data sources in conjunction with fetch results controllers.

26

Understand the various types of delete rules you can specify when deleting managed object instances.

27

Now that you understand delete rules let's implement delete methods for the Reminders app.

28

Understand the difference between Transformable and Binary Data attributes and how you can save large files.

29

Conclusion

2:36

Wrap up this section by reviewing what you've learned in the course, and find out where to go next!

30

Who is this for?

Beginners with just a little bit of iOS and Swift experience. This course isn’t suited for intermediate or advanced developers. If that’s you, check out our intermediate or advanced video courses for more ways to level-up your developer skills!

Covered concepts

  • Managed object models
  • Managed object contexts
  • Fetch requests and fetch results
  • Sorting data with sort descriptors
  • Filtering data with predicates
  • Using fetched results controllers to handle data changes
  • Storing large files as external data

Contributors

Comments