- Product List - The main screen that lists various products from API.
- Product Details - Showing the details of the product.
Loblaw's iOS Challenge is following MVVM architecture.
Need to install cocoa pods
pod install
1.Enums - Storing static keywords, strings, IDs which helps to write code on separate files.
2.Network/API - Handles network calls
- ProductAPI.swift - Responsible to get the list of products using cart endpoint.
- ViewModel - Business logic implemented here, connecting backend and 'View Controller' using adapter.
- Adapter - Handles tableview's delegate and data source, confirms 'ProductListProtocol'
- Protocol - Defines set of operations 'View Controller' needs to handle.
- Model - Defines API response as ProductList structure to handle product details.
- View - Connects to UI and responsible to show data on phone, confirms ProductList Protocol. While loading display data using a view model and updates the tableview.
- View - Simply showing product details on the screen, which is selected from the previous view(ProductList).
- App should look for the Internet connectivity and notify the user if not available.
- Lazy loading or Pagination needs to integrate to handle more data.
- Table view can be animated and show the loading indicator.
- Label text needs more constraints according to UI design.
- Product List
- Product details