Skip to content

vineetsansare/iTunesApp

Repository files navigation

iTunesApp

This repo holds the code for iTunesApp for a POC using VIP - clean-Swift Architecture.

About App

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.

Note for the Reviewers

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

Running the app

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

Important Info

_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'

Screenshots

Simulator Screen Shot - iPhone 11 Pro Max - 2021-12-19 at 02 17 23

Simulator Screen Shot - iPhone 11 Pro Max - 2021-12-19 at 02 17 26

Simulator Screen Shot - iPhone 11 Pro Max - 2021-12-21 at 18 47 49

Simulator Screen Shot - iPhone 11 Pro Max - 2021-12-19 at 02 17 29

Simulator Screen Shot - iPhone 11 Pro Max - 2021-12-19 at 02 17 34

Simulator Screen Shot - iPhone 11 Pro Max - 2021-12-19 at 02 17 45

Simulator Screen Shot - iPhone 11 Pro Max - 2021-12-19 at 02 17 50

Simulator Screen Shot - iPhone 11 Pro Max - 2021-12-19 at 02 18 10

Simulator Screen Shot - iPhone 11 Pro Max - 2021-12-19 at 02 18 24

Simulator Screen Shot - iPhone 11 Pro Max - 2021-12-19 at 02 18 41

Simulator Screen Shot - iPhone 11 Pro Max - 2021-12-19 at 12 47 39

Known issues [FIXED]

  • 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.

Updates

  • 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 :)

MediaTypeSelector scene Screen Shot 2021-12-23 at 1 27 18 AM Screen Shot 2021-12-23 at 1 28 06 AM Screen Shot 2021-12-23 at 1 28 49 AM

SearchCriteria scene Screen Shot 2021-12-23 at 1 29 20 AM Screen Shot 2021-12-23 at 1 29 37 AM Screen Shot 2021-12-23 at 1 29 47 AM

SearchResults scene Screen Shot 2021-12-23 at 1 30 04 AM Screen Shot 2021-12-23 at 1 30 21 AM Screen Shot 2021-12-23 at 1 30 37 AM

MediaDetails scene Screen Shot 2021-12-23 at 2 13 20 AM Screen Shot 2021-12-23 at 2 13 31 AM Screen Shot 2021-12-23 at 2 13 41 AM

Screen Shot 2021-12-23 at 2 14 05 AM

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published