[英]Open iTunes from an iPad app to a specific app (advertise my own apps inside my own apps)
When a user clicks the "SHow me more" button in my app, I want to open iTunes on the iPad to that app so they can buy it too. 当用户点击我的应用程序中的“显示更多”按钮时,我想在iPad上打开该应用程序的iTunes,以便他们也可以购买。
How is this done in Objective-C (or Monotouch) 如何在Objective-C(或Monotouch)中完成
just openURL to your user id, for instance, mine is http://itunes.apple.com/us/artist/wrightscs/id387614647
只需openURL到您的用户ID,例如,我的
http://itunes.apple.com/us/artist/wrightscs/id387614647
You can goto one of your apps in iTunes, click on your name and all of your apps will come up, right-click on your name and copy the link. 您可以在iTunes中转到其中一个应用,点击您的姓名,所有应用都会出现,右键单击您的姓名并复制链接。
NSString *urlText = @"http://itunes.apple.com/us/artist/vendor/id000000";
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlText]];
Follow WrightCS's url convention to construct your own url, and then use this line of code to open it. 按照WrightCS的url约定构建自己的url,然后使用这行代码打开它。 Don't worry, iOS is smart enough to open the iTunes app for you.
别担心,iOS足够聪明,可以为您打开iTunes应用程序。
//aUrl is a NSURL instance
[[UIApplication sharedApplication] openURL:aUrl];
For a complete list on how to construct those urls, check this great post: How can I link to my app in the App Store (iTunes)? 有关如何构建这些网址的完整列表,请查看以下精彩文章: 如何在App Store(iTunes)中链接到我的应用程序?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.