an app to list all the news feeds in a list. The selection of any new feed would load the detail page of news.
Please feel free to contanct me for any question.
Mobile : +962786760621.
News API to list of all the news with on demand updates. API parameters :
parameter | Description |
---|---|
q | user search query |
apiKey | key provided by https://newsapi.org/ |
This project demonstrate dependency injection and Swinject in MVVM (Model-View-ViewModel) architecture with RxSwift.
Articles list which fetched from public news API. The user has to search about any company using the top search bar to fetch articles.
Once the user tap on any article, the app shows the article details such as title, decription, image, url..etc.
-
Configurations: App has three xcconfig files to determine the App environment. the environments are Debug, Staging, and Production. You can select one of them for run, test or archive. each environment has it server base URL, API key and app name.
-
MVVM : Model View ViewModel
- Model :
- Entities: is a simple data model which implement decodable parsing protocol to decode JSON from API Call.
- Networking: protocol method to fetch JSON from HTTP request and decode it using 'Himotoki' Pod. It uses Alamofire Pod for Networking.
- View: It is a simple group which contains all app cells and view controllers.
- View Model: It is a group which contains app view models.
- ex :
ArticlesSearchViewModel
is a view model forSearchViewControlle
r.It uses RxSwift to define Inputs and Outputs byAtriclesSearchViewModeling
protocol.It implementAtriclesSearchViewModeling
protocol to handle user seach query and fetch it usingNetwork
Model and present it as CellModel which calledArticleCellModeling
.Also It handle user row selection bypresentDetails
Observable which emit a row selection event toSearchViewController
.
- ex :
- Model :
-
Managers :
- DependencyInjection : class used for register Models , ViewModels and Views into shared container. It can be used to reslove the injected dependencies into another instnace.
- ImageLoader: Use
Nuke
Pod to make simple tasks like loading images into views extremely simple.
-
Preferences: used to get all app preferences like base URL, apiKey ..etc. and it used to for main bundle methods (fetch values from
info.plist
file). -
Resources: group contains Localizable String files to show the app in English and Arabic languages.
Apply UI and Unit testing for search feature.