
Master Swift data in iOS 17 and SwiftUI 5 by building a reading logs app, learning data modeling, adding, updating, deleting records, and advanced filtering and sorting.
Learn how to add Swift data to an existing project. Understand its declarative data persistence with macros, then build a book reading log app with notes.
Define a book data model in SwiftData with a final class Book (title, author, publishedYear), decorated with the @Model macro and wired to a model container for persistence.
Build an add new book view in SwiftUI for SwiftData, binding title, author, and year, with save and dismiss actions to persist records in the data store.
Fetch and display saved books from SwiftData in a SwiftUI list using the add query macro, with a query-backed book view in a navigation stack that supports deletion.
Create a book list in Swift data by enabling add new book, then enhance the list with a book cell view that shows the book title, author, and published date.
Learn to delete records in SwiftData by using the model context, environment object, and the on delete modifier to swipe to delete from the data store and save changes.
Explore updating book records in a reading logs app using a SwiftUI book detail view that toggles editing, initializes state from a book, and saves to SwiftData.
Implement save functionality in the book detail view, updating title, author, and published year via state and persisting with context.save in editing mode, addressing crud operations and navigation issues.
Move the navigation destination outside the list to fix the navigation stack and add the new button to the list view toolbar with a plus circle fill icon.
Explore entity relationships in SwiftData, including 1-to-1, 1-to-many, many-to-one, and many-to-many, with examples and building a notes entity linking books and notes.
Create a new note model linked to a book using swiftdata, with a cascade delete, and build an add new note view to capture title and message.
Build a node list view in SwiftUI using SwiftData to display a book's nodes and notes, including a small sheet detent and note deletion via the model context.
Explore modeling a genre entity and its many-to-many relationship with books using Swifty Data, including a nullify delete rule, a genre list view, and two tabs for books and genres.
Add a bottom-sheet view to create genres in SwiftData. Bind a text field to the genre name, save to the model context, dismiss, and delete from the genre list.
Create a genre selection view in SwiftData, binding a set of selected genres to the add new book view, fetch and sort genres, and present a list with check marks.
Learn to save selected genres with a book, link genres to the book, and render those genres in the book detail view using SwiftData in iOS 17 and SwiftUI 5.
Update a book with genre information by introducing a state property for selected genres, binding a genre selection view in the editing space, and saving changes to the book's genre.
Create a genre detail view to display books under a selected genre using SwiftUI and SwiftData, navigate from the genre list, and show a no data view when empty.
Fix a nil published year during save by using number formatting without grouping, and improve the edit UI with a custom hidden modifier to conditionally show controls.
Learn to store book covers efficiently with SwiftData by adding an optional cover property, using external storage for images, and selecting images via a photo picker.
Extract binary image data from a photo picker item into the selected cover data asynchronously using task, then render the resulting image in the cover preview.
Master the save workflow: store a book cover as binary data in SwiftData, unwrap the selected cover data, and persist the image with the book record on disk.
Read book covers from Swift Data and display them in the book sale view using a fetched image, and prepare the detail view for image edits.
Add the book cover to the book detail view by rendering the image data from Swift Data in view-only mode, and introduce an image picker to replace the cover.
Add a photo picker to the existing book edit view to select and save a book cover using selected cover data, and preview the existing cover in edit mode.
Update the book detail edit flow to display an existing cover or placeholder, using conditional image rendering and a photo picker to add or update covers.
Add a search field to filter books in the reading list using SwiftData. Bind the search text, create a filteredBooks property, and implement a case-insensitive contains check.
Organize your iOS 17 SwiftUI project by creating folders for books, genre, and notes and moving related models and views there, fix the navigation bug by adjusting the searchable placement.
Learn to build dynamic sorting with swift data using query macro, fetch descriptor, and predicate to filter and order genres forward or reverse.
Learn advanced filtering in Swift Data using the query macro to perform database-level searches for books, refactoring into a subview, passing a search term, and validating with SQL debugging.
Learn advanced sorting in SwiftData iOS 17 with predicate based filtering, enabling a book list sort by title, author, or publisher.
Implement empty states with content unavailable views in the reading logs app using SwiftUI 5 and SwiftData, handling empty lists and search results with clarity.
Learn to seed a SwiftData-backed contact list app in SwiftUI by preloading relationships, using a model container with on setup, and guard existing count to prevent duplicates.
Welcome to "Mastering SwiftData in SwiftUI and iOS 17" – your comprehensive guide to unlocking the full potential of SwiftData in building robust and efficient iOS applications. In this course, we will embark on a journey to build a complete app from start to finish, covering every aspect of SwiftData. Throughout this course, you will: Create SwiftData Models: Gain the expertise to craft SwiftData models from scratch, understanding their structure and how to represent data efficiently. Manipulate Data: Learn the ins and outs of SwiftData operations, including adding, updating, and deleting records. Master the art of managing data seamlessly. Efficient Querying: Explore the world of efficient querying in SwiftData, enabling you to retrieve and process data with optimal performance. Entity Relationships: Dive deep into understanding entity relationships, exploring different types, and implementing them in your app to create a cohesive and interconnected data model. Filtering and Sorting: Acquire skills to filter and sort records in SwiftData, allowing you to present data in the most meaningful and organized manner. Handling Complex Types: Delve into the intricacies of storing complex types, such as images, in SwiftData, enhancing your app's capabilities. Advanced Filtering and Sorting Techniques: Elevate your SwiftData proficiency by mastering advanced techniques for filtering and sorting, giving you the tools to implement sophisticated data management strategies. Whether you're a beginner looking to grasp the fundamentals or an experienced developer aiming to refine your skills, this course is designed to empower you with the knowledge and hands-on experience needed to become a SwiftData maestro. Let's build powerful and efficient iOS applications together!