iOS Architecture
Granite (SwiftUI)
Granite is a SwiftUI architecture I built that merges Redux into the functional world of Swift. It powers applications of mine such as Loom.
View the Swift Package on GitHub · iOS 15.4+ | macOS 12+
Navigation
Navigating and routing components have been tricky to resolve in SwiftUI. I always like to have my applications fit the base 3 form factors (iPhone, iPad, macOS). The latter 2 have exclusive design decisions to monitor when calculating tradeoffs — the primary one being the ability to spawn new windows in macOS, while maintaining the same codebase for iOS/iPadOS which do not have the ability to do so. To start with the solution provided in Granite, a NavigationView similar to SwiftUI's out-of-the-box builder is where we start mapping out the Navigation Stack and its ability to react to a pushed view.
The nodes with rounded corners signify structs that inherit SwiftUI's View protocol. A high-level overview of the pathways to represent views on Granite's Navigation Stack. Starting with GraniteNavigationView below, I explain the details of the links shown above when reaching desired experiences.
Notes on Components, Services, and Events are in progress.
Contents