Programmatically run a search on the App Store?

老子叫甜甜 提交于 2019-12-03 07:46:00

Erika Sadun explains how to build an App Store search link here.

Shirkrin

To open iTunes or the AppStore from your application you need to
use the prefix itms://

Then you can search for artists via an URL like this:

itms://phobos.apple.com/WebObject/MZStore.woa/wa/viewArtist?id=someId

Or you can tell AppStore to open up and show a specific app like this:

itms://phobos.apple.com/WebObject/MZStore.woa/wa/viewSoftware?id=someId

The real difference ist just what you wan't to view and the itms:// prefix instead of http.
E.g. using the viewSoftware-Version with id=315316036 will open AppStore
and display Rowmote Pro (random pick, I was just surfing AppStore..).

UPDATE

It looks like it's a little trickier to link to artists and search results than it is
for applications or albums (which both worked in my tests).

I came across this technical Q&A from Apple which states that for some links to work multiple redirects are needed. This could be the point on which iTMS bails out..
(and you don't seem to be the only one with this problem, see here or here).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!