Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Possible to show a "in App Store modal" in iOS 6?

Is it possible to show a modal view controller in iOS 6 that present my app in App Store?

like image 622
Gustaf Rosenblad Avatar asked Oct 18 '12 18:10

Gustaf Rosenblad


1 Answers

Yes you can. (iOS6+)

Take a look at SKStoreProductViewController

NSDictionary *appParameters = [NSDictionary dictionaryWithObject:@"533886215"
                                                          forKey:SKStoreProductParameterITunesItemIdentifier];

SKStoreProductViewController *productViewController = [[SKStoreProductViewController alloc] init];
[productViewController setDelegate:self];
[productViewController loadProductWithParameters:appParameters
                                 completionBlock:^(BOOL result, NSError *error)
{

}];
[self presentViewController:productViewController
                   animated:YES
                 completion:^{

                 }];
like image 56
Daniel Amitay Avatar answered Sep 28 '22 06:09

Daniel Amitay