Suggestions?
I'm working on an iOS app that needs to access Apple Music, Spotify, and SoundCloud and was wondering if you had any pointers. I'm new to programming and have been self taught, so any help is appreciated!
@cloud8421
Hello @kaynelynn,
You will need to investigate each provider's API to see how you can access the data. Most likely you'll be able to access metadata (e.g. artists, album, etc.) but not necessarily the audio files (the API results would give you links to open a track inside the Spotify/Music/SoundCloud app).
Here some starting links:
In terms of technical knowledge needed, you will need to look into how to call an http api and how to decode/encode JSON (which is the format used by all 3 APIs).
I'm not very familiar with Swift (I'm assuming you're using that as you mentioned iOS), but I found this article which goes through the needed steps to get this to work.
Finally, some of these APIs require some sort of authentication, which should be explained in the API docs. iTunes doesn't have one, so it might be the easiest one to start with: for example, https://itunes.apple.com/search?media=music&term=beatles will give you results for Beatles (note that the if you open it in your browser, it downloads as a file, but it's a JSON response).
Awesome. I’ve been working on it, and have made some progress. I’ve got access to a users Apple Music and their media library and can play all local songs. I haven’t figured out how to use the iTunes api to search, mainly because of confusion between the Apple Music API and the iTunes search API. Give how new the Apple Music one is , there’s not much documentation and I’m really just not sure what the differences are. I’ve been able to login to Spotify, with their login button, but am stuck trying to find out how to get the authorization code given once it’s dismissed. Sadly, SoundCloud is no longer accepting new developers and I am going to resort to creating my own version instead. I’m using firebase already, so I plan to have song info stored in firebase with a url and the actual media stored in the cloud storage firebase offers. What do you think?