Making a Real World Application With SwiftUI
Part one: data flow and Redux
Since the State of the Union session at the WWDC 2019, I’ve been engrossed in SwiftUI. I’ve used almost all my spare time to play with it. Now, I’ve decided to make a real world application.
But what defines a real world application?
Well, let me dig into the details of an open source application I’m making exclusively with SwiftUI. This is MovieSwiftUI — an application for browsing, collecting and discovering movies using the TMDB API ️. I’ve always loved movies, and I made a company around that a long time ago. It didn’t work out that great, but the app (a social network around movies) was awesome!
Back on track, what does MovieSwiftUI technically do?
- It talks to an API, a thing most «client» apps do those days.
- It loads async data on demand and parses the JSON into Swift models using Codable.
- It displays images downloaded on demand, and caches them.
- It’s a single target iOS, iPadOS, and macOS application with conditional UI implementation to provide the best UX on iOS, iPadOS, and macOS. It might move to a specific macOS target later in the future.
- The user can generate data and create his own movies lists. The app…