This is Github user search demo app that made with MVP design pattern.
Search Github user and show user result list
- SearchView
- SearchPresenter
- SearchViewPresenter <- Adapt SearchPresenter
- SearchViewDataSource <- Adapt UITableViewDataSource and UITableViewDelegate
Show local on memory favorite repositories
- FavoriteView
- FavoritePresenter
- FavoriteViewPresenter <- Adapt FavoritePresenter
- FavoriteViewDataSource <- Adapt UITableViewDataSource and UITableViewDelegate
Show Github user's repositories
- UserRepositoryView
- UserRepositoryPresenter
- UserRepositoryViewPresenter <- Adapt UserRepositoryPresenter
- UserRepositoryViewDataSource <- Adapt UITableViewDataSource and UITableViewDelegate
Show a repository and add / remove local on memory favorites
- RepositoryView
- RepositoryPresenter
- RepositoryViewPresenter <- Adapt RepositoryPresenter
You can add / remove favorite repositories in RepositoryViewController, but an Array of favorite repository is hold by FavoriteViewController.
You need to set Github Personal Access Token
like this.
extension ApiSession {
static let shared: ApiSession = {
let token = "" // <- Your Github Personal Access Token
return ApiSession(injectToken: { InjectableToken(token: token) })
}()
}
- Xcode 12 or later
- iOS 13 or later
- Swift 5 or later
marty-suzuki, s1180183@gmail.com
iOSDesignPatternSamples is available under the MIT license. See the LICENSE file for more info.