In the last lesson, you added some additional, separate, queries that allowed you to start to filter views in the SwiftRecipes app. This filtering was vital since the amount of sample data in the project was already large, and would just get bigger when more data would get added by the user.
Those queries weren’t ideal however. There are more efficient ways to build queries on the database using predicates, both simple and complex. So in this lesson, you will:
Learn about predicates for building queries in SwiftData
Build predicates that are based on multiple properties
Optimize fetches if you know you just need a limited set of data returned
See forum comments
This content was released on Dec 10 2025. The official support period is 6-months
from this date.
In this segment you’ll get an overview of the goals for this lesson about efficient queries.
Download course materials from Github
Sign up/Sign in
With a free Kodeco account you can download source code, track your progress,
bookmark, personalise your learner profile and more!
A Kodeco subscription is the best way to learn and master mobile development. Learn iOS, Swift, Android, Kotlin, Flutter and Dart development and unlock our massive catalog of 50+ books and 4,000+ videos.