开发者

Open app store from code

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


  1. Launch iTunes on your computer.
  2. Search for the item you want to link to.
  3. Right-click or control-click on the item's name in iTunes, then choose "Copy iTunes Store URL" from the pop-up menu.
  4. Open the modified URL 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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜