A SwiftUI application for listening to and playing previews of Spotify songs.
Liked songs | Song player | Search for songs |
---|---|---|
- Ensure you have Xcode 15 or a higher version installed on your Mac.
- Download or clone SPreview to a directory on your Mac.
- Configure the app with your credentials and then run the current scheme.
- Create a Spotify developer account and get your Client ID and Secret Key.
- Encrypt the auth tokens using a PBKDF2 key using AES.
- Convert the encrypted tokens into their corresponding binary array and add them to SpotifyAuthController file.
- Launch the app on a simulator or a device running on iOS 17 or higher.
- Grant access to your Spotify account to be able to use the app
- Now you can start listening to your liked songs' preview or search for new songs.
- You need to have a premium Spotify account to create a developer account and to play songs seamlessly.
- Since the app was developed using the latest SwiftUI updates announced, the minimum deployment target is set to iOS 17.
SPreview has been implemented utilizing the MVC architecture.
- Presentation folder includes all screens and views files.
- MusicProvider folder includes the protocol and errors enum for providers.
- Network folder includes models, API controllers and data parsers.
- MusicPlayer folder includes the files responsible for managing audio playback within the app.
- Utils folder includes security files, extensions, view modifiers, error handling components and constants.
- Resource folder includes info.plist and app assets.
Cocoapods is used to manage dependencies in this app. The integrated dependencies include:
- Alamofire
- SDWebImageSwiftUI