Hi, fellow Reviewer,
This document will help you build the project and walk you through into some of the specifics of the project. I hope you’ll enjoy reviewing my code.
Cheers !
- Xcode 9.3+
- iOS 11.0+
- Swift 4.0+
This project use Cocoapods. Tap the following commands in the root directory
$> sudo gem install cocoapods
$> pod install
It will generate a file MusicPlayer.xcworkspace. Open the project with it (not with MusicPlayer.xcodeproj)
The architecture evolves around “Stories” where, in the future, whenever the project grows, we can separate different screen logic that represent a new story (ex: Login screens, User Settings screens).
A Story is composed of a Storyboard, ViewControllers, ViewModels and Views directories. This way, it is easy to navigate between classes that are linked inside a same story.
When possible, MVVM is used.
- No possibilities to switch forward or backward between songs
- The Apple Music API has a limit when fetching the top charts (limit of 50)
You will have to manually refresh it using the Apple documentation and also this helper to generate the token.
When you get this token, you have to manually place it in the config files :
MusicPlayer -> Supporting Files -> Config -> Development/Debug/Release.xcconfig
replace the value for the key APPLE_MUSIC_KEY
Two frameworks are used with Cocoapods:
Really good pod to handle loading and caching of images from urls.
AudioPlayer is a wrapper around AVPlayer and also offers cool features.
To test different parts of the project, I use the Xcode test framework.