本文修改了去評(píng)分功能(跳轉(zhuǎn)App Store)
iOS跳轉(zhuǎn)是通過(guò)URL來(lái)進(jìn)行的,這里有兩種形式:
1.itms-apps請(qǐng)求:
iOS系統(tǒng)中可以從應(yīng)用內(nèi)或通過(guò)Safari跳轉(zhuǎn)App商店;
OS X系統(tǒng)中無(wú)法通過(guò)瀏覽器跳轉(zhuǎn);
2.http請(qǐng)求:
iOS系統(tǒng)中可以通過(guò)大部分瀏覽器跳轉(zhuǎn)App商店;
OS X系統(tǒng)中可以通過(guò)瀏覽器跳轉(zhuǎn)iTunes商店;
跳轉(zhuǎn)例子:
static NSString * const reviewURL = @"itms-apps://itunes.apple.com/app/idxxxxxxxx”;
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:reviewURL]];
跳轉(zhuǎn)的URL
1.跳轉(zhuǎn)商店內(nèi)應(yīng)用首頁(yè)
itms-apps://itunes.apple.com/app/idxxxxxxxx
或
http://itunes.apple.com/app/idxxxxxxxx
2.跳轉(zhuǎn)商店內(nèi)應(yīng)用評(píng)論頁(yè)面
itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&id=xxxxxxxx
或
http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&onlyLatestVersion=true&pageNumber=0&sortOrdering=1&id=xxxxxxxx
涉及參數(shù):
type:
onlyLatestVersion: 只顯示關(guān)于最新版本的評(píng)論
pageNumber:
sortOrdering:排序方式
id: xxxxxxxx為app的appleID