In some free apps there is a button for buy pro version of app 开发者_Python百科that if you touch it app store app will open how can i do that from code ?
The iPhone/iPad will automatically recognize an AppStore URL if you just:
- (IBAction)OpenAppInAppStore {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"itms://itunes.apple.com/us/app/wolframalpha/id334989259?mt=8"]];
}
or if you open any URL that has "itms://
" and only on the device
- Launch iTunes on your computer.
- Search for the item you want to link to.
- Right-click or control-click on the item's name in iTunes, then choose "Copy iTunes Store URL" from the pop-up menu.
- Open the
modifiedURL using an NSURL object and the -[UIApplication openURL] method.
Read Technical Q&A QA1629. They also offer a method how you can add your iTunes Affiliate link without redirecting from your app to safari to the appstore
Use the function openURL from UIApplication with the iTunes URL link of your App.
精彩评论