Direct link to app-store application in iOS 7

蹲街弑〆低调 提交于 2019-12-09 06:22:07

问题


I have a free version of app. And there is a link to a full version in free app. The link works fine in iOS 6. But in iOS 7 it shows a blank page. Any help is appreciated!

The link I use:

- (void) getFull
{
    [self hideAnimated];
    NSString *iTunesLink = @"http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=604760686&mt=8";
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:iTunesLink]];
}

回答1:


Pretty strange link you are using. I use:

http://itunes.apple.com/app/id<APP_ID>?mt=8

and everything works...

In apps supporting iOS6 and above, I suggest furthermore the use of StoreKit, so you can display your app page in the App Store without leaving your app. You can do that like this:

- (void)productViewControllerDidFinish:(SKStoreProductViewController *)viewController
{
   [viewController dismissViewControllerAnimated:YES completion:nil];
}

- (void)showAppWithIdentifier:(NSNumber *)identifier
{

  if ([SKStoreProductViewController class]) {
     SKStoreProductViewController *controller = [[SKStoreProductViewController alloc] init];
     controller.delegate = self;
     [controller loadProductWithParameters:@{ SKStoreProductParameterITunesItemIdentifier : identifier }
                          completionBlock:NULL];

     [self presentViewController:controller animated:YES completion:nil];
     return;
   }

    // Fall back to opening App Store for iOS 5.
    ... open the link as you are already doing
}



回答2:


Try this one, it's the new syntax with iOS 7 and replace APP_ID by your application's AppID.

itms-apps://itunes.apple.com/app/idAPP_ID

You can refer to this link and this one for more information and discussion about that.



来源:https://stackoverflow.com/questions/19067892/direct-link-to-app-store-application-in-ios-7

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!