{"id":21374089,"url":"https://github.com/powerwolf543/Swift-MVP-Sample","last_synced_at":"2025-07-13T08:32:32.270Z","repository":{"id":37682310,"uuid":"157065594","full_name":"powerwolf543/Swift-MVP-Sample","owner":"powerwolf543","description":"It's an iOS simple project that how I implement MVP (Model-View-Presenter) and Clean Architecture in Swift.","archived":false,"fork":false,"pushed_at":"2020-08-22T11:35:16.000Z","size":15843,"stargazers_count":41,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-18T01:03:35.791Z","etag":null,"topics":["clean-architecture","ios","mvp","repository-pattern","swift","viper-architecture"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/powerwolf543.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-11T09:39:25.000Z","updated_at":"2024-06-17T17:03:19.000Z","dependencies_parsed_at":"2022-09-15T09:01:30.042Z","dependency_job_id":null,"html_url":"https://github.com/powerwolf543/Swift-MVP-Sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/powerwolf543%2FSwift-MVP-Sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/powerwolf543%2FSwift-MVP-Sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/powerwolf543%2FSwift-MVP-Sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/powerwolf543%2FSwift-MVP-Sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/powerwolf543","download_url":"https://codeload.github.com/powerwolf543/Swift-MVP-Sample/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225868624,"owners_count":17537088,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clean-architecture","ios","mvp","repository-pattern","swift","viper-architecture"],"created_at":"2024-11-22T08:29:41.031Z","updated_at":"2024-11-22T08:30:14.766Z","avatar_url":"https://github.com/powerwolf543.png","language":"Swift","funding_links":[],"categories":["OOM-Leaks-Crash"],"sub_categories":["Architecture Design Pattern"],"readme":"[![swift](https://img.shields.io/badge/language-swift-red.svg)](https://developer.apple.com/swift/)\n\n# Swift-MVP-Sample\n\nIt's an iOS simple project that how I implement `MVP` (Model-View-Presenter) and `Clean Architecture` in Swift. \n\n## Requirements\n\n- Xcode 10.2+\n- Swift 5.0+\n\n## Architecture\n\n![](architecture.jpg)\n\n### View Layer (MVP)\n- `View` - Displays information from the `Presenter` and sends user interactions back to the `Presenter`.\n- `Presenter` - Contains the presentation logic and tells the `View` what to present\n- `ViewBuilder` - The `Builder’s` responsibility is to instantiate a specific `View` and injects the dependency for all components.\n- `Router` - Handles navigation logic for which screen should appear and when.\n\n### Domain Layer\n- `UseCase` - Contains the business logic for a specific use case in the project. They are view agnostic and can be consumed by one or many `Presenters`.\n- `Model` - Simple data model objects.\n\n### Data Layer\n- `Repository` - Query objects from different data sources (Core Data, Realm, web server, etc.) with a only single-entry point.\n\n## References\n\n- [iOS: MVP clean architecture in Tiendeo app](https://medium.com/tiendeo-tech/ios-mvp-clean-architecture-in-tiendeo-app-a8a597c49bb9)\n- [Library - iOS - MVP + Clean Architecture Demo](https://github.com/FortechRomania/ios-mvp-clean-architecture/)\n- [The Clean Architecture, by Uncle Bob](https://blog.cleancoder.com/uncle-bob/2012/08/13/the-clean-architecture.html)\n- [Test Double](https://www.martinfowler.com/bliki/TestDouble.html)\n\n## Author\n\nNixon Shih, powerwolf543@gmail.com\n\n## License\n\nSwift-MVP-Sample is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpowerwolf543%2FSwift-MVP-Sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpowerwolf543%2FSwift-MVP-Sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpowerwolf543%2FSwift-MVP-Sample/lists"}