iOS 應用件跳轉到appstore相關界面

跳轉到應用詳情界面:

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];
}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章