直接链接到应用商店的应用程序在iOS中7 [英] Direct link to app-store application in iOS 7

查看:213
本文介绍了直接链接到应用商店的应用程序在iOS中7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有应用程序的免费版本。并且在免费的应用程序为完整版的链接。
链接工作正常的iOS 6,但在iOS的7它显示了一个空白页。
任何帮助AP preciated!

链接我使用的:

   - (无效)getFull
{
    [个体经营hideAnimated]
    * NSString的iTunesLink = @http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=604760686&mt=8
    [UIApplication的sharedApplication]的OpenURL:[NSURL URLWithString:iTunesLink]];
}


解决方案

pretty您使用的是奇怪的链接。我使用的:

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

和一切正常......

在应用支持iOS6的以上,我建议进一步利用StoreKit的,所以你可以不离开你的应用程序显示在App Store应用页面。你可以做到这一点是这样的:

   - (无效)productViewControllerDidFinish:(SKStoreProductViewController *)的viewController
{
   [的viewController dismissViewControllerAnimated:YES完成:无];
} - (无效)showAppWithIdentifier:(NSNumber的*)标识
{  如果([SKStoreProductViewController类]){
     SKStoreProductViewController *控制器= [[SKStoreProductViewController的alloc]初始化];
     controller.delegate =自我;
     [控制器loadProductWithParameters:@ {SKStoreProductParameterITunesItemIdentifier:标识}
                          completionBlock:NULL];     [自presentViewController:控制器动画:是完成:无];
     返回;
   }    //回退到打开应用程序商店的iOS 5中。
    ...打开链接,你已经在做
}

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]];
}

解决方案

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
}

这篇关于直接链接到应用商店的应用程序在iOS中7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆