You're looking for SKStoreProductViewController
- which looks like this:
It works for apps, songs, books - anything on the iTunes store. Image credit techotopia.
This is a good tutorial on the subject - usage comes down to:
- Importing the
StoreKit
framework, - Creating an instance of the view controller,
- Assigning a delegate,
- Telling it what to display,
- Presenting it,
- And implementing the delegate methods
Which comes down to this code:
SKStoreProductViewController *storeViewController = [[SKStoreProductViewController alloc] init];
storeViewController.delegate = self;
NSDictionary *parameters = @{SKStoreProductParameterITunesItemIdentifier:[NSNumber numberWithInteger:<item id>]};
[storeViewController loadProductWithParameters:parameters
completionBlock:^(BOOL result, NSError *error) {
if (result)
[self presentViewController:storeViewController
animated:YES
completion:nil];
}];
You can get your iTunes product ID using iTunes' LinkMaker. The ID is also shown under the Manage your Apps section of iTunes Connect:
The one required delegate method is a simple dismissal action:
- (void)productViewControllerDidFinish:(SKStoreProductViewController *)viewController
{
[viewController dismissViewControllerAnimated:YES completion:nil];
}