我有2个版本的应用。精简和付费。 我希望在Lite版本中有一个按钮,当点击它时在iPhone上打开App Store应用程序并显示该应用程序的付费版本的页面。
我该怎么做? 我不想在Safari中打开付费版iTunes页面。它应该只在App Store应用程序中打开。
谢谢!
答案 0 :(得分:4)
这应该始终有效(所有操作系统):
http://itunes.apple.com/app/idYOUR_PAID_APP_ID
代码段(您只需复制并粘贴):
#define YOUR_PAID_APP_ID 553834731 // replace with your paid app ID
static NSString *const iOSAppStoreURLFormat = @"http://itunes.apple.com/app/id%d"; // General link to the App Store
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat: iOSAppStoreURLFormat,YOUR_PAID_APP_ID ]]]; // Would open the right link