开发者

Open app store from code

开发者 https://www.devze.com 2023-02-06 12:04 出处:网络
In some free apps there is a button for buy pro version of app 开发者_Python百科that if you touch it app storeapp will open how can i do that from code ?The iPhone/iPad will automatically recognize an

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

精彩评论

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