How do I launch the iTunes Store app from my application?

亡梦爱人 提交于 2020-01-05 09:04:16

问题


How do I launch the iTunes Store app from my application? I want to take the user to a podcast page.


回答1:


Create a UIWebView, and put the link in so that when they press the button/link, it sends then to the URL for the web page. You'd think it'd open up in the webView, but usually iTunes automatically opens the iTunes app or the app store.

Need you learn how to use a webView? There are plenty of tutorials out there that can help. You can simply Google a tutorial, or search YouTube. Or, you can also post another question if you reach a problem.

Hope this is what you're looking for, your question was slightly confusing. If it isn't, I'd suggest revising your question slightly to specify.




回答2:


  1. Go here to get the URL for your podcast in iTunes.
  2. Replace "http://" with "itms://" in the URL you got in step 1.
  3. Put this code where you want to open your podcast:

    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"<URL FROM STEP #2>"]];




回答3:


Couldn't you just find the link of the podcast in iTunes and then encorporate the link in your application?



来源:https://stackoverflow.com/questions/8867618/how-do-i-launch-the-itunes-store-app-from-my-application

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