开发者

How to open "Paid" app page in iPhone's AppStore by clicking button in "Lite" app?

I have 2 versions of an app. Lite and Paid. I want to have a button in Lite version which 开发者_如何学Cwhen clicked opens App Store application on iPhone and shows the page for Paid version of the app.

How do I do this? I DONT want to open Paid version iTunes page in Safari. It should open in App Store application only.

Thanks!


This should work always (all OS):

http://itunes.apple.com/app/idYOUR_PAID_APP_ID

Code snippet (you can just copy & paste it):

#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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜