About this Course

Persisting data is a necessary skill for any iOS developer. This course will teach you three techniques for storing data to your device’s hard drive: how to store small pieces of simple data using NSUserPreferences, how to save files on the device’s file system using NSFileManager, and -- most importantly -- how to manage and persist data with structure and relationships using Core Data.

Course Cost
Free
Timeline
Approx. 2 months
Skill Level
Advanced
Included in Course
  • Rich Learning Content

  • Interactive Quizzes

  • Taught by Industry Pros

  • Self-Paced Learning

  • Student Support Community

Join the Path to Greatness

This free course is your first step towards a new career with the Become an iOS Developer Nanodegree Program.

Free Course

iOS Persistence and Core Data

Enhance your skill set and boost your hirability through innovative, independent learning.

Icon steps

Course Leads

  • Fernando Rodriguez
    Fernando Rodriguez

    Instructor

  • Eden Shapiro
    Eden Shapiro

    Instructor

  • Kate Rotondo
    Kate Rotondo

    Instructor

What You Will Learn

Lesson 1

Simple Persistence

  • Learn about simple persistence and how to save small pieces of data.
  • Set user preferences using NSUserDefaults in an existing app.
  • Enable an app’s user preferences to appear in the Settings app.
Lesson 1

Simple Persistence

  • Learn about simple persistence and how to save small pieces of data.
  • Set user preferences using NSUserDefaults in an existing app.
  • Enable an app’s user preferences to appear in the Settings app.
Lesson 2

The iOS File System

  • Learn about the iOS File System, and your app’s sandbox.
  • Read and save files using NSFileManager in an existing app.
  • Understand the performance implications of atomic (all-at-once) file operations.
Lesson 2

The iOS File System

  • Learn about the iOS File System, and your app’s sandbox.
  • Read and save files using NSFileManager in an existing app.
  • Understand the performance implications of atomic (all-at-once) file operations.
Lesson 3

Introducing Core Data

  • Meet Core Data, Apple’s framework for managing the data layer.
  • Explore what a data layer is.
  • Convert a non-Core Data note-taking app to have a Core Data model.
Lesson 3

Introducing Core Data

  • Meet Core Data, Apple’s framework for managing the data layer.
  • Explore what a data layer is.
  • Convert a non-Core Data note-taking app to have a Core Data model.
Lesson 4

The Core Data Stack

  • Set up the classes we need to get Core Data up and running.
  • Use the stack to manage model object creation and deletion.
  • Persist changes so that data stays put when you restart the app or device.
Lesson 4

The Core Data Stack

  • Set up the classes we need to get Core Data up and running.
  • Use the stack to manage model object creation and deletion.
  • Persist changes so that data stays put when you restart the app or device.
Lesson 5

Simpler Code with Core Data

  • Enable user interfaces to reactively update whenever the model changes.
  • Set up an NSFetchedResultsController to observe data changes and notify the UI.
  • Create a new version of a data model, modify a table view to work with a fetched results controller, and turn on caching.
Lesson 5

Simpler Code with Core Data

  • Enable user interfaces to reactively update whenever the model changes.
  • Set up an NSFetchedResultsController to observe data changes and notify the UI.
  • Create a new version of a data model, modify a table view to work with a fetched results controller, and turn on caching.
Lesson 6

Core Data & Concurrency

  • Update the data model and safely migrate user data between versions.
  • Work with multiple managed object contexts for different types of tasks.
  • Keep the user interface responsive by sending lengthy tasks to a background queue.
Lesson 6

Core Data & Concurrency

  • Update the data model and safely migrate user data between versions.
  • Work with multiple managed object contexts for different types of tasks.
  • Keep the user interface responsive by sending lengthy tasks to a background queue.

Prerequisites and Requirements

This course assumes intermediate iOS experience. Specifically, you have a solid foundation in Swift, including experience writing tableview-based applications. Introduction to iOS App Development with Swift and UIKit Fundamentals are good courses to take if you need to familiarize yourself with these concepts.

You will need access to a Mac computer running OS X 10.12.6 or later, and the ability to install Xcode 9.2. However, you do not need an iPad or iPhone to complete the activities. You will test and run all exercises using the iOS simulator built into Xcode.

See the Technology Requirements for using Udacity.

Why Take This Course

Apps need to be able to store information—including app settings, downloaded data, user-generated data, game state, and more—so that it isn’t lost when the app crashes or the device restarts.

The apps you’ve written up to now probably do not persist their data. They likely make use of the device’s RAM (random-access memory). RAM is volatile, meaning it only maintains its data while the device is powered. To retain data long-term, you need to save it to non-volatile memory, or storage. In the case of a desktop computer, you’d need to save it to the hard drive; in the case of iOS, we need to save it to the device’s flash memory.

Different options are available to store different types of data. In this course, you’ll learn when to use NSUserDefaults, NSFileManager, or employ Core Data, and get practice using all three.

What do I get?
  • Instructor videos
  • Learn by doing exercises
  • Taught by industry professionals
Icon globe

Udacity 现已提供中文版本! A Udacity tem uma página em português para você! There's a local version of Udacity for you! Sprechen Sie Deutsch?

Besuchen Sie de.udacity.com und entdecken Sie lokale Angebote, unsere Partnerunternehmen und Udacitys deutschsprachigen Blog.

前往优达学城中文网站 Ir para a página brasileira Go to Indian Site Icon flag de Zu de.udacity.com continue in English