Michael Long
Oct 19, 2023

--

We basically created an enumeration a module exposes that says, "here are the external views that I need".

We then use the dependency injection system to return a provider for that type.

The app (which can see all) builds the provider when needed.

The view doesn't know who is providing the view, it just knows that it needs one and that the app needs to provide it when asked.

--

--

Michael Long
Michael Long

Written by Michael Long

I write about Apple, Swift, and SwiftUI in particular, and technology in general. I'm also a Lead iOS Engineer at InRhythm, a modern digital consulting firm.

No responses yet