Reputation: 477
I have an app that plays music and I need to implement iTunes search. So, for example, I need to find song by Pink Floyd called Time. How can I open iTunes Store on iOS with results of search query "Pink Floyd - Time"? I know it's possible, since there is an app in App Store, called VK App, a client for social network that does exactly that.
And do I need to somehow request approval of this function by Apple?
Upvotes: 1
Views: 1021
Reputation: 1364
For loading dynamically you can use like this example, it will open the itunes store with the searched item: @"itms://phobos.apple.com/WebObjects/MZSearch.woa/wa/advancedSearchResults?artistTerm=pink%20floyd&songTerm=High%20Hopes"
Also, you can perform a search and parse the result (a json) to provide a more specific link using this web service:
https://itunes.apple.com/search?term=pink+floyd%20high%20hopes
Here is the link for the API: http://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html
I am using the second approach on one of my app's. Works good
Wish it helps
Upvotes: 1
Reputation: 8576
Apple has a link maker designed to do just that.
Here's the link to it.
Upvotes: 1