We may earn an affiliate commission when you visit our partners.
Course image
Norbert Grover

Are you looking to master data persistence in iOS development using SwiftUI? Do you want to learn Core Data, UserDefaults, Keychain storage, File System storage, and Caching to build efficient, secure, and high-performance mobile applications?

This course is designed for iOS developers of all levels who want to understand and implement data storage techniques in SwiftUI applications. Whether you're a beginner exploring iOS persistence or an experienced developer looking to optimize your app’s data management, this course covers everything you need.

What You’ll Learn:

Read more

Are you looking to master data persistence in iOS development using SwiftUI? Do you want to learn Core Data, UserDefaults, Keychain storage, File System storage, and Caching to build efficient, secure, and high-performance mobile applications?

This course is designed for iOS developers of all levels who want to understand and implement data storage techniques in SwiftUI applications. Whether you're a beginner exploring iOS persistence or an experienced developer looking to optimize your app’s data management, this course covers everything you need.

What You’ll Learn:

Core Data – Learn how to set up, manage relationships, and use NSManagedObject for persistent storage.UserDefaults & AppStorage – Store small user preferences and settings with SwiftUI’s built-in property wrapper.Keychain Storage – Securely store sensitive information such as passwords and authentication tokens.File System Storage – Understand the Documents, Caches, and Temporary Directories for managing images, PDFs, and structured data.Caching Strategies – Implement memory and disk caching to optimize performance and reduce network load.Practical Projects – Apply these techniques in real-world scenarios, such as saving user data, handling authentication, and improving app efficiency.

Why Take This Course?

  • Hands-on Learning: We build multiple projects to apply each concept in real-world applications.

  • Step-by-Step Approach: No fluff—just clear, practical explanations to help you understand persistence from the ground up.

  • SwiftUI-Focused: Learn modern, declarative UI development while integrating data persistence techniques.

  • Full-Scale Data Management: Learn when and why to use different storage solutions and how to implement them correctly.

By the end of this course, you'll have the confidence to implement robust data persistence strategies in your own iOS apps and optimize performance while ensuring data security.

Join now and take your SwiftUI persistence skills to the next level.

Enroll now

What's inside

Learning objectives

  • Implement core data to manage and persist structured data in swiftui apps.
  • Use userdefaults and appstorage to store lightweight user preferences.
  • Securely store and retrieve sensitive data using keychain services.
  • Work with ios file system directories for persistent and temporary storage.
  • Save, retrieve, and delete files, images, and pdfs in the documents directory.
  • Optimize performance with caching to reduce unnecessary data fetching.
  • Use temporary storage for session-based data that doesn’t need persistence.
  • Design scalable and maintainable data persistence solutions for ios apps.
  • Set up and configure core data in a swiftui project for data persistence.
  • Design core data entities, attributes, and relationships for scalable data models.
  • Use fetchrequests to retrieve and filter data efficiently in swiftui views.
  • Implement one-to-many relationships in core data.
  • Use nspersistentcontainer to manage the core data stack effectively.
  • Compare core data with sqlite and decide when to use each.
  • Perform direct sql queries on a sqlite database in ios apps.
  • Show more
  • Show less

Syllabus

Students will learn what this course covers.
What This Course Covers
The basics of SQL Lite

Are you developing an iOS app and need a reliable way to store data? In this video, we explore SQLite, the built-in database engine for iOS, and why it's a great choice for mobile apps.

What You'll Learn:

  • What is SQLite?

  • Why SQLite is ideal for offline data storage

  • How it compares to Core Data and other database solutions

  • The benefits and limitations of using SQLite in iOS development

Whether you're building a to-do list, a note-taking app, or any application that requires structured data storage, SQLite offers a lightweight, efficient, and scalable solution. Watch now to learn how to integrate SQLite into your iOS app.

Read more

This video provides a step-by-step guide to implementing SQLite in an iOS app using Swift and SwiftUI. You will build a fully functional application that allows users to add, view, and manage a list of users with a name and phone number.

What You Will Learn:

  • How to integrate SQLite into an iOS project

  • How to store, retrieve, update, and delete user data using SQLite

  • How to connect SQLite with SwiftUI to update the user interface dynamically

  • How to use SQL queries in Swift for efficient database operations

Included in the Course:

  • Full source code that can be copied, pasted, and run immediately

  • Detailed explanations of each part of the code

  • Best practices for managing SQLite databases in iOS applications

This video is designed for iOS developers who want to implement local data storage efficiently. By the end of the video, you will have a working SQLite-powered iOS app and the knowledge to integrate SQLite into your own projects.

This concise guide provides essential SQLite queries for creating tables, inserting, updating, retrieving, and deleting data. Perfect for beginners, it includes clear syntax examples to help you efficiently manage databases in your applications.

This tutorial provides a comprehensive explanation of foreign keys in SQLite. It covers the purpose of foreign keys, how they establish relationships between tables, and their role in maintaining data integrity. The tutorial includes practical examples of implementing foreign keys, enforcing constraints, and using cascading actions such as ON DELETE CASCADEand ON DELETE RESTRICT. Additionally, it explains how to enable foreign key support in SQLite and demonstrates how to retrieve related data using JOIN queries. By the end of the tutorial, you will understand how to effectively use foreign keys to create structured and reliable databases.

This tutorial provides a step-by-step guide to creating relationships between tables in SQLite. It covers different types of relationships, including one-to-one, one-to-many, and many-to-many, using foreign keys. The tutorial explains how to enforce data integrity, retrieve related data using JOIN queries, and apply cascading actions for automatic updates and deletions. By the end of the tutorial, you will have a clear understanding of how to structure relational databases effectively in SQLite.

Furthermore, I have added a 'Joins.docx' file as a resource. If you are a developer who isn't knowledgeable about inner joins, left joins, etcetera, this is a great resource to help explain them.

What is Core Data? How does it work with SwiftUI? And why is it one of the best ways to persist data in your iOS app? This tutorial will explain everything you need to know.

What You’ll Learn:

  • What Core Data is and how it works

  • Why Core Data is a great choice for data persistence

  • How to integrate Core Data into a SwiftUI project

  • Fetching, adding, and deleting data with Core Data

  • Best practices for working with Core Data efficiently

Whether you're a beginner or an experienced SwiftUI developer, this tutorial will provide a clear understanding of Core Data and how to use it in your apps.

By the end of this video, you will have a fully functional SwiftUI app that saves and loads data using Core Data.

In this tutorial, you will learn how to add Core Data to an existing Xcode project and set up a fully functional data persistence system in SwiftUI. If you didn't enable Core Data when creating your project, don't worry—this video will walk you through the process from start to finish.

n this video, we break down the three key components of the Core Data stack: Managed Object Model, Persistent Store Coordinator, and Managed Object Context. You'll learn how they work together to define, store, and manage data efficiently in your Swift and SwiftUI apps.

What You'll Learn:

  • What the Managed Object Model is and how it defines your data structure.

  • How the Persistent Store Coordinator connects your data model to the database.

  • Why the Managed Object Context acts as a temporary workspace for creating, editing, and saving data.

By the end of this tutorial, you'll have a clear understanding of how Core Data manages persistence and how to use it effectively in your app.

In this video, we take a deep dive into a complete Core Data and SwiftUI app, explaining every line of code in detail. You will learn how Core Data integrates with SwiftUI, including:

  • Setting up the Persistence Controller

  • Using @FetchRequest to fetch and display data

  • Adding, deleting, and managing Core Data objects

  • Understanding NSPersistentContainer and viewContext

By the end of this video, you will have a clear understanding of how to build and manage a SwiftUI app with Core Data. This tutorial is ideal for both beginners and those looking to improve their Core Data skills.

This video covers how to create relationships between Core Data entities and generate NSManagedObject subclasses in Swift. You will learn how to define one-to-many and many-to-one relationships, configure delete rules, and manage data persistence effectively. The video also explains the role of NSManagedObject subclasses, when you need to generate them manually, and how Codegen settings impact Core Data class generation.

By the end of this tutorial, you will have a clear understanding of how to structure your Core Data model and interact with entities in SwiftUI.

This video breaks down the difference between CoreDataClass and CoreDataProperties in Core Data. Learn why Core Data generates these files, how they relate to NSManagedObject, and how Codegen settings impact them.

What You’ll Learn:

  • Purpose of CoreDataClass and CoreDataProperties

  • How attributes and relationships are handled

  • How Codegen affects file generation

  • Best practices for managing Core Data models

Perfect for iOS developers working with Core Data in Swift.

In this video, we explore UserDefaults in Swift, a simple and efficient way to store user preferences, settings, and small amounts of data. You'll learn how to save and retrieve values, update UI elements dynamically using @AppStorage, and ensure user preferences persist across app launches. By the end, you'll have a solid understanding of how to integrate UserDefaults into your SwiftUI apps.

In this video, we explore the basics of @AppStorage property wrapper.

This video explains how to store data using the iOS file system in Swift. Learn the differences between the Documents, Caches, and Temporary directories, when to use each, and how they impact data persistence and iCloud backup. Understand the best practices for storing user-generated content, caching temporary files, and managing large media assets efficiently. By the end, you'll know which storage option is best for your app’s needs.

This video explains the Documents directory in Swift, a key part of the iOS file system for persistent storage. Learn how it works, why it’s ideal for user-generated content, and how it integrates with iCloud backup to keep data secure across devices. We’ll also cover best practices for storing files, when to use it, and how to manage storage efficiently.

In this video, you'll learn how to save, retrieve, and delete images in SwiftUI using the Documents directory for persistent storage. We'll walk through selecting an image from the photo library, saving it locally, displaying it in the app, and managing storage with deletion. This is essential for handling profile pictures, offline media, and document management in iOS apps.

In this video, we explore Temporary Directories in SwiftUI, explaining how they work and when to use them for short-term file storage. You'll learn how to save, retrieve, and automatically delete temporary files, and why iOS removes them under certain conditions. We'll also cover best practices for handling temporary images, text files, and downloadsin your app. Perfect for developers looking to manage temporary data efficiently in SwiftUI!

This video explains Keychain persistence in Swift, a secure way to store sensitive data like passwords, authentication tokens, and encryption keys. Learn how Keychain provides encryption, secure access control, and data persistenceeven after app deletion. We’ll cover when to use Keychain, how it compares to UserDefaults and file storage, and best practices for protecting user data in iOS apps.

In this video, we explore how to securely store, retrieve, and delete user credentials using Apple’s Keychain in a SwiftUI app. Learn how to manage login credentials, authentication tokens, and sensitive data while ensuring security and persistence. We’ll walk through real-world examples, including handling multiple user accounts and preventing duplicate entries. Perfect for secure authentication in iOS apps.

In this video, we explore how caching works in iOS development with SwiftUI, covering both memory cache (NSCache) and disk cache (Caches Directory). Learn how to store and retrieve images efficiently, reduce network requests, and improve app performance. We'll also demonstrate how to clear cache, force reloads, and verify that cached data is being used. Perfect for developers looking to optimize data handling in SwiftUI apps!

Save this course

Create your own learning path. Save this course to your list so you can find it easily later.
Save

Activities

Coming soon We're preparing activities for Mastering Persistence in iOS Mobile development with SwiftUI. These are activities you can do either before, during, or after a course.

Career center

Learners who complete Mastering Persistence in iOS Mobile development with SwiftUI will develop knowledge and skills that may be useful to these careers:
iOS Developer
An iOS Developer builds, maintains, and enhances applications specifically for Apple's iOS ecosystem. This career path deeply involves managing how data is stored, retrieved, and optimized on the device. This course is an essential foundation for any aspiring or current iOS Developer, as it provides comprehensive expertise in data persistence. Learners will gain mastery over Core Data for structured data, UserDefaults for preferences, Keychain for secure sensitive information, and efficient File System storage for various media. The inclusion of SQLite for robust local database management and advanced caching strategies directly equips an iOS Developer to build resilient, secure, and fast mobile applications, which are critical traits for success in this role.
SwiftUI Developer
A SwiftUI Developer specializes in building user interfaces and application logic using Apple's declarative UI framework. Given SwiftUI's tight integration with data presentation, mastering data persistence is fundamental for creating dynamic and responsive applications. This course is uniquely tailored for a SwiftUI Developer, offering in-depth knowledge of how to integrate Core Data effectively with SwiftUI using FetchRequests and NSPersistentContainer. It also covers SwiftUI's built-in AppStorage for user preferences and demonstrates how to leverage various storage solutions like Keychain and File System within a modern SwiftUI architecture, enabling the creation of scalable and maintainable applications with seamless data management.
Mobile Application Developer
A Mobile Application Developer creates and maintains software applications for mobile devices, often needing to manage data locally for offline access, performance, and user settings. This course provides a significant advantage for a Mobile Application Developer by focusing on robust data persistence strategies. By learning Core Data for complex relationships, SQLite for flexible database solutions, and File System storage for media, learners can tackle diverse data challenges. Implementing Keychain for security and caching for performance ensures that applications are not only functional but also secure and highly efficient, skills universally valued in mobile development regardless of the specific platform.
Software Engineer Mobile
A Software Engineer Mobile designs, develops, and deploys high-quality software solutions for mobile platforms, requiring a comprehensive understanding of system architecture, performance, and data management. This course provides a crucial skillset for a Software Engineer Mobile by diving deep into local data persistence mechanisms. Learning Core Data, SQLite, and file system management allows for informed architectural decisions regarding data storage. The emphasis on secure data handling with Keychain and performance optimization through caching directly contributes to building robust and efficient mobile software. This course fosters the ability to design scalable data persistence solutions, a hallmark of excellent mobile engineering.
Technical Lead Mobile
A Technical Lead Mobile guides development teams, makes critical technical decisions, and ensures the architectural integrity and performance of mobile applications. A deep understanding of underlying technical mechanisms, including data persistence, is essential for this leadership role. This course helps build a strong foundation for a Technical Lead Mobile by providing in-depth knowledge of various data storage solutions like Core Data, SQLite, UserDefaults, Keychain, and File System storage. The focus on designing scalable and maintainable data persistence solutions, optimizing performance, and ensuring data security directly prepares one to oversee complex mobile projects and mentor team members effectively on best practices.
Performance Engineer Mobile
A Performance Engineer Mobile specializes in optimizing the speed, responsiveness, and resource utilization of mobile applications. Data persistence significantly impacts app performance, especially regarding loading times and network usage. This course offers invaluable insights for a Performance Engineer Mobile by focusing extensively on caching strategies, including memory and disk caching. Learners will understand how to optimize performance and reduce network load by effectively managing cached data. The detailed coverage of efficient data retrieval with Core Data's FetchRequests and intelligent use of temporary storage directories also directly contributes to identifying and resolving performance bottlenecks, leading to faster and more efficient mobile experiences.
Mobile Solutions Architect
A Mobile Solutions Architect designs the overall technical blueprint for mobile applications, defining the structure, components, and interfaces. Data persistence is a foundational aspect of any mobile architecture. This course is highly relevant for a Mobile Solutions Architect as it provides a detailed exploration of various data storage techniques available on iOS. Understanding the strengths and weaknesses of Core Data, SQLite, Keychain, and File System storage empowers the architect to select the most appropriate persistence strategy for different application requirements. The course's emphasis on performance optimization, data security, and designing scalable solutions directly supports the creation of robust and efficient mobile architectures.
Security Engineer Mobile
A Security Engineer Mobile focuses on safeguarding mobile applications and user data from vulnerabilities and threats. Secure data storage is a cornerstone of mobile security. This course provides highly pertinent knowledge for a Security Engineer Mobile by dedicating specific sections to Keychain storage. Learners will understand how to securely store sensitive information, such as passwords and authentication tokens, leveraging Apple's built-in secure enclave. The course also discusses best practices for data persistence, implicitly covering considerations for protecting various types of data stored on the device, enabling a Security Engineer to assess and implement robust security measures for mobile applications.
Quality Assurance Engineer Mobile
A Quality Assurance Engineer Mobile is responsible for ensuring the reliability, functionality, and performance of mobile applications through rigorous testing. Understanding how data persistence is implemented is crucial for designing effective tests for data integrity, security, and offline capabilities. This course may be useful for a Quality Assurance Engineer Mobile by providing a detailed overview of Core Data, SQLite, UserDefaults, Keychain, and File System storage mechanisms. This knowledge helps in identifying potential issues related to data corruption, ensuring secure storage of sensitive information, and verifying proper data synchronization and caching behavior, which are all vital aspects of mobile app quality assurance.
User Interface Engineer Mobile
A User Interface Engineer Mobile focuses on building the visual and interactive components of mobile applications, often using frameworks like SwiftUI. While primarily concerned with appearance and interaction, the UI frequently displays and manipulates persistent data. This course may be helpful for a User Interface Engineer Mobile by illustrating how persistent data drives dynamic user interfaces. The course's SwiftUI-focused approach, combined with topics like AppStorage for user preferences and FetchRequests for displaying Core Data, helps engineers understand the connection between data management and UI responsiveness. This knowledge empowers them to build more intuitive and data-driven user experiences.
Product Manager Mobile
A Product Manager Mobile is responsible for the strategy, roadmap, and feature definition of mobile applications, bridging the gap between business needs and technical execution. This course may be useful for a Product Manager Mobile as it provides insight into the technical complexities of data persistence. Understanding how data is stored, including secure options like Keychain and performance-boosting caches, allows a product manager to make more informed decisions about feature feasibility, user experience, and potential security implications. This technical literacy helps in communicating effectively with engineering teams and better defining product requirements related to data handling and offline functionality.
Application Developer
An Application Developer builds software applications across various platforms and domains. A core skill for any application developer is the ability to manage and persist data reliably. This course may be useful for an Application Developer looking to enhance their capabilities in local data management. By covering diverse persistence strategies—from simple UserDefaults to complex Core Data and SQLite databases—learners gain a holistic view of storing application data. The focus on data security with Keychain and performance optimization through caching are universally beneficial for building robust, efficient, and user-friendly applications, regardless of whether they are mobile-first or not.
Embedded Software Developer
An Embedded Software Developer creates software for specialized computer systems often with limited resources, such as IoT devices or automotive systems. These roles frequently require efficient and reliable local data storage and management. While the specific technologies (iOS, SwiftUI) differ, an Embedded Software Developer may find foundational concepts in this course useful. The deep dive into efficient local data persistence with SQLite, Core Data, and various file system strategies, along with caching techniques, provides transferable knowledge. Understanding how to manage memory and storage effectively in resource-constrained environments, ensuring data integrity without continuous network access, aligns with challenges faced in embedded development.
Database Developer
A Database Developer designs, implements, and maintains databases, ensuring data integrity, performance, and scalability. This course may be useful for a Database Developer, particularly one interested in client-side or smaller-scale database solutions. The extensive coverage of SQLite, including SQL queries, creating relationships, foreign keys, and joins, provides a practical understanding of relational database management at a fundamental level. While the scale is specific to mobile, the principles of data modeling with Core Data entities, managing relationships, and ensuring persistence translate to broader database development concepts, helping to build a foundation in data structures and efficient data handling.
Cloud Engineer Mobile
A Cloud Engineer Mobile specializes in designing and managing cloud infrastructure and services that support mobile applications, often dealing with backend data storage, APIs, and synchronization. This course may be helpful for a Cloud Engineer Mobile by providing a deep understanding of how mobile clients manage data on their end. Knowing the intricacies of client-side persistence (Core Data, SQLite, caching) enables the engineer to design more effective backend strategies for data synchronization, offline capabilities, and API interactions. Understanding client-side constraints and performance considerations, as explored in this course, is crucial for building a resilient and optimized mobile cloud ecosystem.

Reading list

We haven't picked any books for this reading list yet.
Covers designing and building data-intensive applications. It discusses various types of data persistence, including file-based, database, and cloud-based, and how to choose the right type for an application.
Focuses on using Hibernate, an object-relational mapping (ORM) framework, for data persistence. It teaches the basics of Hibernate and how to map objects to a relational database.
Explores the inner workings of various data systems, including databases and distributed systems. It's excellent for deepening one's understanding of how data persistence is implemented at a lower level and in distributed environments. It valuable resource for those interested in the mechanics of data storage and retrieval.
Covers using Spring Data, a framework for data persistence in Java, for data persistence. It teaches the basics of Spring Data and how to use it in application development.
Covers using JPA, a standard for object-relational mapping (ORM) in Java, for data persistence. It teaches the basics of JPA and how to use it in application development.
Covers data persistence in the cloud using various cloud computing platforms. It teaches the basics of cloud computing and how to use it for data persistence.
Covers best practices for data persistence, including how to choose the right data persistence method and how to design and implement a data persistence layer. It also covers common pitfalls and how to avoid them.
Covers using NHibernate, an ORM framework for .NET, for data persistence. It teaches the basics of NHibernate and how to use it in application development.
Covers using Redis, an in-memory data structure store, for data persistence. It teaches the basics of Redis and how to use it in application development.
Provides a comprehensive overview of the fundamental concepts and challenges in designing data systems. It covers various data storage and processing technologies, making it excellent for gaining a broad understanding of data persistence in modern applications. It is highly regarded in the industry and is valuable as both a learning resource and a reference.
Delves into the theoretical underpinnings of the relational model and SQL. It's excellent for deepening one's understanding of relational databases, which are central to much of data persistence. It is more theoretical and best suited for those who want a rigorous understanding.
Provides a concise introduction to the concepts behind NoSQL databases and when to use them. It's valuable for understanding contemporary approaches to data persistence beyond traditional relational databases. It serves as a good starting point for exploring the diverse landscape of NoSQL options.
While not solely focused on data persistence, this classic book covers architectural patterns for enterprise applications, including patterns for data access and persistence. It provides valuable context for how data persistence fits into larger application designs. It foundational text for software architecture.
Discusses fundamental principles of software architecture and design, which are relevant to designing maintainable and testable data persistence layers. It provides valuable insights into structuring code that interacts with databases and other persistence mechanisms. It widely recommended book for software developers.
Definitive guide to dimensional modeling, a technique widely used in data warehousing and business intelligence. It provides a deep dive into designing databases for analytical purposes, offering a different perspective on data persistence focused on reporting and analysis.
Focuses specifically on Entity Framework Core, a popular ORM for .NET development. It's highly relevant for developers working with ASP.NET Core and C#, covering practical aspects of data persistence in that ecosystem. It useful reference for developers using EF Core.
This book, while a general Android programming guide, includes sections on data persistence using SQLite and other Android-specific mechanisms. It's valuable for those focusing on mobile data persistence on the Android platform. It serves as a practical guide with hands-on examples.
Covers data warehousing, a specific type of data persistence used for business intelligence and data analysis. It teaches the basics of data warehousing and how to design and implement a data warehouse.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser