https://gist.github.com/soxjke/2f5e3b1d1b0ca560dbe18df6144195f4
Run Tons.xcworkspace
No additional instalation needed. It's treated as production release. Therefore there is Pods included in that repository.
-
Product's list:
- Shows product's collection(image, name and price)
- API fetch
- Paging
- Selectable. Adds new product into cart. If product already is in the cart increases it's quantity. User is notified by cart's badge that cart is change
- Image lazy load
- Image placeholder
- Abaptable UI
-
Cart:
- Shows cart's items
- API fetch
- API update
- Changes a product's quantity.
- Removes product from the cart if quantity is zero
- Resets cart's badge
- Use
identifierForVendor
as cart id. CartDO NOT
survive application reinstall. It's simplification coz iOS simulator won't work withDeviceCheck API
-
API
- Cancalable POST requests
- Pagination
- Flexible request configuration
- Flexible host configuration
-
Testability
- Basic preparation for Unit Tests. Model can moved into module. Public protocols presented.
- [CocoaPods] - Dependency manager
- [Alamofire] - Common networking library. Manage requests and it's canceling
- [AlamofireImage] - Image lazy loading
- [MVC] - Basic Apple's MVC arcitecture has been choosen. It's quite simple and quick solution for that kind of project. NotificationCenter is used as main source of Model->Controller communication. It's old(before SwiftUI) Apple's recomendations. It's implementation should demonstrate basic iOS developing skils.
- [storyboards UI] - The fastest way to implement UI. should demonstrate deep knowlage in impleneting UI with storyboadrs.
- Unit Tests.
- Cover model's public protocols ~4h
- Cover model's internal methods ~4h
- Cover ViewControllers
- Run to 100% coverage
- UI
- Optimistic UI features
- Empty states
- Prodgress indication
- Pull to Refresh
- Error handling
- developmention ~13h
- docomentation ~2h