News for hackers. Stuff that matters.
Re:9 years of Apple text editor solo dev by orenlindsey on Friday January 05, 2024 @10:56AM (#38880421)
SwiftUI is pretty good, I've been using to build an app. The big problem is navigation and state handling, it's not intuitive (although I never used AppKit or UIKit so I can't say if it's better or worse)
Re:9 years of Apple text editor solo dev by jshier on Friday January 05, 2024 @11:01AM (#38880487)
Yeah, you really need to combine SwiftUI with a dedicated architecture like PointFree's Swift Composable Architecture. It solves your state and navigation problems while adding dependency and testing solutions as well.

Apple's stubborn and bizarrely proud insistence on not providing the full solution here is very annoying.

Re:9 years of Apple text editor solo dev by bsaul on Friday January 05, 2024 @12:56PM (#38882164)
just had a look at Composable Architecture, and it looks like swiftUI being the equivalent of react, they faced the same problem and someone developed a redux in swift. Am i correct ?
Re:9 years of Apple text editor solo dev by jshier on Friday January 05, 2024 @01:02PM (#38882274)
Kind of, but without the reactive UI bits, since SwiftUI already provides that (they provide a way to publish state into the older frameworks as well). It's heavily inspired by Elm and React but doesn't match 1:1 with either.
Re:9 years of Apple text editor solo dev by jimbokun on Friday January 05, 2024 @11:33AM (#38880953)
> The big problem is navigation and state handling

Those seem like very basic features that a UI framework needs to get right.

Re:9 years of Apple text editor solo dev by jshier on Friday January 05, 2024 @11:50AM (#38881205)
Apple seems to think the UI frameworks should only focus on UI, and so overall arch is an afterthought. You can, of course, navigate and store state using the tools provided, but it's a pain to do so beyond local screens, where you have to manually pass things around, and you lose most testability.
Re:9 years of Apple text editor solo dev by interactivecode on Friday January 05, 2024 @12:47PM (#38882045)
You should give it an other go building on SwiftData and the new Observation API’s. They made leaps and bounds and it’s so much better now!

I’m having a lot of fun with it at the moment. If you stay within the bounds of how they encourage you to build the apps, you can just go go go and with very little work release a fast, stable, native app across all their platforms.