Custom backing store for SwiftData?

I’m working on an app where I have some sensitive data that I want to encrypt when persisting. It looks like SwiftData has a BackingData protocol but it mentions it's for in-memory only.

Is there a way to provide a custom storage for SwiftData so that I can encrypt the data before saving?

Post not yet marked as solved Up vote post of mctavish Down vote post of mctavish
581 views