▲ 10 r/swift

SwiftData and Database Manager Layer

Hello all,

I’m trying to better understand the different techniques people use to manage a SwiftData layer in a scalable application.

I understand that ModelContext is used to create, update, and delete SwiftData models, but I’m struggling to see how this approach scales cleanly beyond smaller applications. Passing a ModelContext from a SwiftUI View into a view model feels awkward. Also, the Query property wrapper is tightly coupled to the SwiftUI view layer.

I have a lot of questions about the intended architecture here. The overall approach feels very “Apple,” but I’m having trouble understanding why it is considered scalable as an application grows. In my own project, I’m ending up with far too much persistence logic inside my SwiftUI Views, and the code is becoming increasingly difficult to manage.

I’d love to have an open discussion about how others structure and manage their SwiftData layer in larger applications. I’m especially interested in approaches that keep SwiftUI views focused on presentation while still working naturally with SwiftData.

Hopefully, this can lead to a useful discussion that helps all of us write cleaner, more maintainable code.

Best,
S

reddit.com
u/Moo202 — 2 days ago

Remade Exercise Search View from Scratch

I remade the exercise search view in Swift with SPM + CoreData. Want to see Bevel will make a custom search bar instead of using system. I don’t like the system blue cancel button in the search bar

I didn’t like the search bar that Bevel uses (it is a system search bar) so I rebuilt it myself. This supports search with text, filter by muscle group, and equipment.

u/Moo202 — 19 days ago
▲ 4 r/swift

Hello all,

I recently made some substantial updates to my Swift package, Plume.

Plume is a high-performance abstraction over Core Animation’s emitter system that makes it easier to build particle effects in both SwiftUI and UIKit. The API is heavily focused on type-driven configuration and aims to feel natural in modern Swift codebases. All while only exposing lightweight sensible defaults and easy to use types

I have been putting a lot of effort into improving the API design, documentation, CI reliability, and overall developer experience, and I would love feedback from other iOS developers.

In particular, I would appreciate thoughts on:

- API design

- Naming

- SwiftUI ergonomics

- Performance considerations

- Anything that feels awkward/confusing

Repo: https://github.com/samlupton/Plume

Thanks in advance.

u/Moo202 — 2 months ago

Hello all,

I am looking for feedback on my swift package. It’s a particle emitter abstraction. I’m an iOS dev with 1YOE, trying to learn about more iOS topics.

Please note, my next steps are to write unit tests and thorough documentation so please skip that for now if you can.

https://github.com/samlupton/Plume

Thank you in advance.

reddit.com
u/Moo202 — 2 months ago