2. SwiftData Containers and Preview Data

Published: 05 November 2023
on channel: Stewart Lynch
9,580
360

This is the second video in the SwiftData series. In this video, you will learn how you can use a custom configuration to specify the name and location of your model container, and how you can create a preview container and load mock data for your previews.

If you want to support my work, you can buy me a coffee :)
https://ko-fi.com/stewartlynch

Table of Contents:
0:00 Introduction
1:37 Containers and Configurations
10:45 Preview/Mock Data
13:45 Preview Container

Starter Project Files:
https://github.com/StewartLynch/MyBoo...

Completed Project:
https://github.com/StewartLynch/MyBoo...

All videos in this section
SwiftData: CRUD operations
   • 1. SwiftData CRUD Operations  

SwiftData: Containers and Mock Data
   • 2. SwiftData Containers and Preview Data  

SwiftData: Dynamic sorting and filtering
Coming November 19

References mentioned in video:
Sample Data
https://gist.github.com/StewartLynch/...

Working with Previews in SwiftData (TundsDev video)
   • How To Use SwiftData with Preview | S...  

Recommended Resources:
BigMountain Studio Books
SwiftUI Views Mastery
https://www.bigmountainstudio.com/vie...
SwiftUI 5 Book Bundle
https://www.bigmountainstudio.com/boo...
Combine Mastery in SwiftUI
https://www.bigmountainstudio.com/com...
Core Data Mastery in SwiftUI
https://www.bigmountainstudio.com/cor...
SwiftUI Animations Mastery
https://www.bigmountainstudio.com/ani...

AppCoda Books
Beginning iOS 16 Programming with Swift (SwiftUI + UIKit)
https://gumroad.com/a/646790611/WihuX
Beginning iOS 16 Programming with Swift (SwiftUI + UIKit) - Starter
https://gumroad.com/a/646790611/mOzKq
Mastering SwiftUI 4 + Swift Programming for iOS 16 - Professional
https://gumroad.com/a/646790611/gjPBw
Mastering SwiftUI 4 - Starter
https://gumroad.com/a/646790611/TyNEz

Other References:
Stewart Lynch's YouTube Channel:
   / @stewartlynch  
Stewart Lynch on Mastodon:
https://iosdev.space/@StewartLynch
Stewart Lynch On Threads:
@StewartLynch
Stewart Lynch on X:
https://x.com/StewartLynch
Stewart Lynch on LinkedIn
  / stewartlynch  


Watch video 2. SwiftData Containers and Preview Data online without registration, duration hours minute second in high quality. This video was added by user Stewart Lynch 05 November 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 9,580 once and liked it 360 people.