跳轉到應用詳情界面:
UIApplication *app = [UIApplication sharedApplication];
NSString *str = [NSString stringWithFormat:@”在商店複製下來的鏈接”];
NSURL *url = [NSURL URLWithString:str];
if ([app canOpenURL:url]) {
[app openURL:url];
}
跳轉到應用評論頁
UIApplication *app = [UIApplication sharedApplication];
NSString *str = [NSString stringWithFormat:
@”itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%d”,
你的應用id];
NSURL *url = [NSURL URLWithString:str];
if ([app canOpenURL:url]) {
[app openURL:url];
}