Interactors are REQUIRED in Swift’s Clean Architectures

I’ve got them in my interpretation of MVVM-C. Do you?

Steven Curtis
4 min readDec 2, 2021

I’ve had a great experience with MVVM-C, and that interpretation even uses Dependency Injection. I thought I was an awesome developer when I thought about this, and gave myself a big pat on the back (even when other people called me an offensive term for using MVVM-C).

If you want an example of what’s being talked about here, take a look at my Deezer project.

The thing is, everything can be improved. Since publishing that article I’ve cleaned up some of the code (really needed to be done), but more importantly I’ve been thinking about the context that this architecture would be useful for.

Which brings me onto this article: Why use this architecture at all?

Making it Clean?

Clean architecture is a domain-centric architecture. Entities are considered to be business logic and should reflect the behaviour of an application. Data flow does not capture the entire programming world as we can encapsulate the business logic before considering what data or UI depends wholly on that domain.

Mapping this to iOS…

--

--