Direct link to app-store application in iOS 7

前端 未结 2 1642
灰色年华
灰色年华 2021-02-10 00:52

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!

2条回答
  •  终归单人心
    2021-02-10 01:21

    Pretty strange link you are using. I use:

    http://itunes.apple.com/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
    }
    

提交回复
热议问题