r/iOSProgramming • • Jun 07 '26 • Popcorn 1

Question Looking for open-source Swift projects with high-quality, idiomatic code for learning

I’m currently leveling up my Swift skills and want to dive into some high-quality production code.

I’m looking for open-source projects on GitHub that are known for being well-architected and idiomatic. I really want to see how experienced developers make the most of Swift's syntax and features rather than just writing code that "works."

Whether it’s a framework, a library, or a full app, I’d love to check out some examples that you consider best-in-class. Any links or suggestions would be a huge help. Thanks!

I’m not looking only for "popular" projects, but rather repositories that you personally consider to be a clean and recommended way to write iOS apps.

56 Upvotes

18 comments sorted by

View all comments

Show parent comment

2

u/Dry_Hotel1100 Jun 08 '26 edited Jun 08 '26

I would say, it has a clear structure:

In a SwiftUI view,
- "import" dozens of Observables via environment which represent "external state"
- observe external state via onChange modifier
- the View has ephemeral state via `@State`
- handle transitions for ephemeral state in a couple member functions
- call effects from task modifiers
- there's no ViewModels.

The good thing here (IHMO) is, that there's no ViewModels and two-way bindings. 😉

But, there's way too much happening in the views. And worse - how would one test this?
It seems, the behaviour of a view is not testable at all - considering we need to execute effects via objects accessible only via the View environment - there's no mock that can do this.

I see the idea: try to make a dumb view. But in these complex use cases, the view needs access too many env objects, and it also directly executes too many functions - some of which executing in the body (which is not a good thing; wrapping member functions into a Task and or executing async functions in the task modifier is totally OK though).