APACHE-2.0 License
MVC intended initially to distribute the applications components among separate pieces. But generally the result was : Lack of Distribution : The controller ends up doing all the job. from handling user interactions, to setting up views. doing network calls, data parsing and so and so on… This is also known as Massive view controller. Low test coverage : Apart from breaking the single responsibility principle. the controller is tightly linked to the view lifecycle. testing view controllers becomes a tough task.
Then MVP architecture comes to improve this situation. by adding the main component which is Presenter.
Now the viewController is considered as a view. which means it will include only the view related code, nothing more. and all logic will be implemented in the presenter. Then components description becomes as the following :
It’s important to note that MVP uses passive View pattern. it means all the actions will be forwarded to the presenter. Which will trigger the ui updates using delegates. so the view will only passe actions and listen to the presenter updates.
Source: https://medium.com/@saad.eloulladi/ios-swift-mvp-architecture-pattern-a2b0c2d310a3