在ios 6.0 之前 一直是
NSString *strString = [NSStringstringWithFormat:@"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%@",appid];
[[UIApplication sharedApplication] openURL:[NSURLURLWithString:strString]];
但是在7.0之后 这个链接好像不能用了 只能直接跳转到APP了
一个方法是:
NSString *str = [NSString stringWithFormat:@"itms-apps://itunes.apple.com/app/id%@",AppID];
还有一种方法评论内置到app中 StoreKit.framework 提供了方法
- (void)evaluate{
//初始化控制器
SKStoreProductViewController *storeProductViewContorller =[[SKStoreProductViewController alloc] init];
//设置代理请求为当前控制器本身
storeProductViewContorller.delegate = self;
//加载一个新的视图展示
[storeProductViewContorller loadProductWithParameters:
//appId唯一的
@{SKStoreProductParameterITunesItemIdentifier : @"587767923"}completionBlock:^(BOOL result, NSError *error) {
//block回调
if(error){
NSLog(@"error %@ with userInfo %@",error,[error userInfo]);
}else{
//模态弹出appstore
[self presentViewController:storeProductViewContorller animated:YEScompletion:^{
}
];
}
}];
}
//取消按钮监听
-(void)productViewControllerDidFinish:(SKStoreProductViewController*)viewController{
[selfdismissViewControllerAnimated:YES completion:^{
}];
}
这样如果评论的话直接跳转跳转就可以了 不用打开浏览器进去跳转