Tour of SQLiteData: Assets

Episode #349 • Jan 5, 2026 • Subscriber-Only

We explore how SQLiteData gives you precise control over your data model, including larger blobs of data, by adding a photo avatar feature to our scorekeeping app. Along the way we will explore a new iOS 26 style confirmation dialogs and a SwiftUI binding trick.

Previous episode
Tour of SQLiteData: Assets
Locked

Unlock This Episode

Our Free plan includes 1 subscriber-only episode of your choice, plus weekly updates from our newsletter.

Sign in with GitHub

Introduction

Stephen

OK, we have now employed a very advanced technique in our application. We have constructed a query that is capable of simultaneously selecting all games from our database, as well as a count of players in each game, and we are displaying that information in the view. Any change made to the database will cause the view to re-render, and we even made this a little more efficient by cutting off that subscription to the database when the view is not displayed on screen.

Both of these things are just not really possible with SwiftData. SwiftData does not expose a powerful enough query language to compute what we want in a single query, and it does not give us a tool to stop the view from rendering when it’s not visible.

Brandon

Let’s move onto the next big feature that our SQLiteData library supports, which is seamless assets. For many kinds of apps we can store assets directly in the database, and SQLiteData takes care of packaging up that data into a CKAsset to send off to iCloud. Let’s explore this by implementing a feature that allows us to choose images for each of our players.

Player assets


References

Downloads

Get started with our free plan

Our free plan includes 1 subscriber-only episode of your choice, access to 75 free episodes with transcripts and code samples, and weekly updates from our newsletter.

View plans and pricing