This repo holds the code for iTunesApp for a POC using VIP - clean-Swift Architecture.
This is a simple app which basically fetches a media details from the iTunesSearch API, and parses the JSON response into models which are Codable
structs & ultimately displaying it in a collectionView. Every item is a product item which displays the details in a collectionView (grid as well as list). On tapping any of the item, user can get into the detail screen.
You can also play a video, book, podcast, song.
Covered most of the required activities
- Retrived data from the given endpoint
- Designed Search criteria screen
- Designed Media Type selector screen
- Designed Search Results screen
- Designed Media Details screen
- Followed VIP architecture
- Unit tests using Quick, Nimble (Work In Progress)
- Clear README.md that explains how the code and the test can be run
Once you have clonned the app to your local system, you can fire-up the app by opening iTunesApp.xcworkspace file.
Please note that I've puashed the pods as well. So you don't need to run pod install
_To demonstrate that I also have knowledge on using Cocoapods, I'm using few 3rd party pods like
- pod 'SwiftLint'
- pod 'SnapKit'
- pod 'Alamofire'
- pod 'CollectionKit', '~> 2.4.0'
- pod 'CollectionKit/WobbleAnimator', '~> 2.4.0'
- pod 'Quick'
- pod 'Nimble'
-
Unable to pop from MediatTypeSelector (Child) screen to SearchCriteria (Parent) screen. - I've followed the original clean-swift blog website and his sample app to navigate from Child to Parent but for some reason I am getting presentingViewController in routeToSearchCriteria() method of MediaTypeSelectorRouter as nil. thus its not poping. Therefore I have to send the entities in the iTunesSearch API hardcoded. -
UTs are not covered as I was completing the app's functionality and was stuck at some point and needed time to figure it out. This is because it's the first time I'm having hands on experience on the VIP architecture. Once I use it on day to day basis then I can assure you the pace will increase.
- Fixed the issue of navigating from MediaTypeSelector (Child) to SearchCriteria (Parent) screen.
- Updated the UTs (Raised in separate PR)
- Code coverage is about 42% (I can work on compeleting the remaining as well. But I believe this much is enough to demo my understanding on writing the UTs :)