简体   繁体   English

如何从我的应用程序启动应用商店

[英]How can I launch app store from my application

Im trying to implement button which opens app store application from my app. 我正在尝试实现从我的应用程序打开应用程序商店应用程序的按钮。 I use this simple line of code, which opens safari but not app store application. 我使用此简单的代码行来打开safari,但不打开应用商店应用程序。

[[UIApplication sharedApplication] openURL:[NSURL URLWithString: @"http://itunes.apple.com/sk/app/tweetie-2/id333903271?mt=8"]];

I dont know whats wrong, is the URL format correct? 我不知道怎么了,URL格式正确吗? I was following this document . 我正在关注这份文件

All related questions in stackoverflow are outofdate I suppose. 我认为stackoverflow中的所有相关问题都已过时。

According to the documentation, iTunes affiliate links have to process several redirects in order to wind up in iTunes. 根据文档,iTunes会员链接必须处理多个重定向才能在iTunes中结束。 Follow the example to create an NSURLConnection , set yourself as its delegate, and use the string it ends up with to open with UIApplication . 按照示例创建一个NSURLConnection ,将自己设置为它的委托,并使用最终使用的字符串通过UIApplication打开。

If you want to bypass Safari, change 'itunes' in the URL to 'phobos'. 如果要绕过Safari,请将URL中的“ itunes”更改为“ phobos”。 Note that this will fail in the simulator, but most definitely works on the device. 请注意,这将在模拟器中失败,但是绝对可以在设备上使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何直接从我的应用程序启动Appstore应用程序 - How Can I Launch The Appstore App Directly from my Application 如何从我的应用程序启动QuickTime? - How can I launch QuickTime from my app? 我多久可以在 App Store 上更新我的应用程序? - How often I Can Update my Application on App Store? 我可以让用户完全不使用App Store应用程序从我的iOS应用程序中的App Store购买吗? - Can I let the user buy from App store within my iOS app without going to App Store application at all? 我可以从通话事件中启动我的应用程序吗? - Can I launch my application from a call event? 如何从我的应用程序启动我的设置包? - How do I launch my settings bundle from my application? 如何从我的应用程序内启动邮件应用程序? - How can to launch the Mail app from within my app? 我可以在App Store上隐藏我的iPhone应用程序或使其无法搜索吗? - Can I hide or make my iphone Application unsearchable on the App Store? 如何检测我的iOS应用内浏览器中的链接是否会启动App Store? - How do I detect if a link in my iOS in-app browser will launch the App Store? 如何检测我的App Store应用程序在哪个系统上运行? - How can I detect which system my App Store application is running on?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM