Saving Data In Your iOS App using Core Data

Zeph Cohen, iOS Engineer

Play Speed
  • 0.5x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 2x
20 Lessons (4h 31m)
    • 1. 0 intro video

      1:01
    • 2. 1 getting setup

      2:00
    • 3. 2 core data api overview

      8:20
    • 4. 3 project explanation creating our model

      10:38
    • 5. 4 locating our managed object model

      7:39
    • 6. 5 creating the persistence coordinator

      9:09
    • 7. 6 setting up our unit test target

      26:42
    • 8. 7 constructing the core data stack

      10:06
    • 9. 8 saving fetching from a context

      31:26
    • 10. 9 deleting from a context

      19:36
    • 11. 10 configuring the persistence coordinator

      10:33
    • 12. 11 creating and saving folders

      17:15
    • 13. 12 intro to the nsfetched results controller

      13:25
    • 14. 13 displaying folders

      16:26
    • 15. 14 deleting folders

      4:51
    • 16. 15 building the notes user interface

      12:38
    • 17. 16 displaying notes

      20:22
    • 18. 17 creating new notes

      13:37
    • 19. 18 updating and deleting notes

      19:25
    • 20. 19 preloading cached data

      15:33

About This Class

3c84e8d2

All apps manage the display, retrieval, and persistence of data. Being able to save data locally is very important in order to continue to provide a good user experience for the users of your app who are operating in an offline mode or have an unstable internet/cellular connection. Core Data is a powerful technology that Apple provides that allows data to be persistent in memory as well as saved into a SQLite database stored on the device.

This class covers specialized topics around Core Data as well as fundamentals of Test Driven Development. This course is broken down as follows: 

  • Learning what Core Data is and implementing out our Core Data APIs
  • Testing our Core Data APIs using concepts of Test Driven Development
  • Connecting Our Core Data APIs to our app UI. 
  • Learning techniques for preloading data at app startup.

This class is intended for intermediate iOS developers who already are familiar with the fundamental skills and want to extend those skills to locally persist data using Core Data.

Specific Topics Covered In This Course: 

  • Fundamentals of the Core Data API
  • Different ways of persisting data using Core Data (in memory, SQLite)
  • Learning how to utilize the NSPersistentContainer
  • Learning how to create a managed object model (NSManagedObjectModel)
  • How to structure data relationships in the NSManagedObjectModel
  • Loading cached data into a table view using a NSFetchedResultsController
  • Fetching, saving, deleting, and updating NSManagedObjects using a NSManagedObjectContext
  • Techniques for unit testing by applying concepts of test driven development (TDD)
  • Dependency Injection
  • Techniques for pre loading locally bundled data into your application at startup

Technologies Used In This Course:

  • Swift 4 and higher
  • Xcode 10 and higher
  • macOS operating system