Sectioned Queries in SwiftData (iOS 27)

You've always been able to fetch SwiftData objects. But grouping them into sections for lists meant manual dictionaries, sorting, and transformation code.

iOS 27 changes that.

What's covered:

  • Creating SwiftData models with relationships
  • Using @Query(sectionBy:) — the new parameter
  • Building sectioned SwiftUI lists automatically
  • Working with relationships between categories and expenses
  • Previewing SwiftData apps with sample data

Real example: A budgeting app where expenses are grouped by budget category — no manual grouping code required.

In partnership with
Fastlane alternative – CLI tools

Are you tired of Ruby and Fastlane installation issues? There's got to be a better way! Discover Codemagic open source CLI tools. It is not a drop-in replacement for all of what Fastlane does (screenshots for example), but we use it at Codemagic to build and publish iOS and Android apps, also versioning and device provisioning.

View on GitHub
© 2026 Mobile Signal. All rights reserved.
Made by
Stan
linkedin