BrightDigit #108 - Should You SwiftData 🤔
View this email in your browser
Issue #108
Hello everyone,
Ever found yourself paralyzed by the question:
Which local storage solution should I use?
You're not alone.
After trying out many options while building Bushel, I've finally put together all my thoughts, frustrations, and unexpected wins in this guide to help you decide if SwiftData is your friend or foe.
BRIGHTDIGIT.COM
If you need local storage, Swift has its advantages and disadvantages.
The Swift Storage Showdown: Why This Matters
Choosing the wrong storage solution now could mean painful migrations, performance headaches, or worse.
Here are things to think about:
- - **The Apple Ecosystem** – When Apple's way makes sense and when it's just making your life harder
- **Core Data vs SwiftData** – An honest look at the tradeoffs
- **The Swift 6 Factor** – Why those shiny new macros might become your biggest headache
- **Escape Routes** – The alternative packages I actually respect
No long-winded theoretical explanations here – just practical advice from someone who made the mistakes so you don't have to.
[**Skip the learning curve →**](https://brightdigit.com/articles/swiftdata-considerations/) ## The Backstory: My SwiftData JourneyWhen I started building <a href="https://getbushel.app/"><span style="color:rgb(0, 0, 0);">Bushel</span></a> in 2023, I was THIS close to avoiding SwiftData entirely. The XML format of Core Data gave me nightmares, and I initially stuck with User Defaults.
Eventually, I  caved and went with SwiftData, hit some walls with that pesky @Query macro, and ended up building <a href="https://github.com/brightdigit/DataThespian"><span style="color:rgb(0, 0, 0);">DataThespian</span></a> just to make it all work with ModelActors. Was it worth it? [You'll have to read to find out...](https://brightdigit.com/articles/swiftdata-considerations/)
## Want More SwiftData Goodness?I've gone down this rabbit hole so you don't have to:
- - How to Actually Make SwiftData CRUD Operations Work
- The SwiftData Sendable Survival Guide
- ModelActor Magic in SwiftData
SHARE.TRANSISTOR.FM
[Empower Apps | Local Database Storage on iOS with Aaron Douglas](https://share.transistor.fm/s/f6092e38)
In this episode, Leo talks with Aaron Douglas from Automattic and Ray Wenderlich author on local database storage on iOS. Why you should do it? What the difference between SQLite and Core Data? ... and more
Did I get it all wrong? Have a storage solution that changed your life? [Let me know](https://brightdigit.com/contact-us/) or just reply to this email.
Until next time,
Leo
*Copyright (C) 2024 . All rights reserved.*
*|IFNOT:ARCHIVE_PAGE|**|END:IF|*
Our mailing address is:
*|IFNOT:ARCHIVE_PAGE|**|HTML:LIST_ADDRESS_HTML|**|END:IF|*
Want to change how you receive these emails?
You can [update your preferences]() or [unsubscribe]()
*|IF:REWARDS|* *|HTML:REWARDS|* *|END:IF|*