APP内下载APP
应用内下载其他的APP是ios的新功能。
详细介绍请参见:https://developer.apple.com/search/index.php?q=SKStoreProductViewController
下面说一下简单的用法:
SKStoreProductViewController *skVC=[SKStoreProductViewController new];
skVC.delegate=self;
NSDictionary *dict = [NSDictionary dictionaryWithObject:@"395133418" forKey:SKStoreProductParameterITunesItemIdentifier];
[skVC loadProductWithParameters:dict completionBlock:nil];
[self presentViewController:skVC animated:YES completion:nil];
//@"395133418" 可在itunes的连接中找到
//此方法是SKStoreProductViewControllerDelegate的实现方法,用于监控返回的按钮状态
-(void) productViewControllerDidFinish:(SKStoreProductViewController *)viewController{
[self dismissViewControllerAnimated:YES completion:^{
NSLog(@"dismiss");
}];
}