NSString *appstoreUrlString = [NSString stringWithFormat:
@"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%@",
m_appleID ];//這是你們自己app在iTunes的id,可以在iTunes查詢到
NSURL * url = [NSURL URLWithString:appstoreUrlString];
if ([[UIApplication sharedApplication] canOpenURL:url])
{
[[UIApplication sharedApplication]openURL:url];
}
else
{
NSLog(@"can not open");
}
//跳轉到AppStore頁面
https://itunes.apple.com/cn/app/id1144816653?mt=8
iOS10.3以后支持APP內進行評論(注意:只能是發布環境才能提交,測試環境不行的)
#import <StoreKit/StoreKit.h>
if([SKStoreReviewController respondsToSelector:@selector(requestReview)]){
[SKStoreReviewController requestReview];
}else{
NSString * nsStringToOpen = [NSString stringWithFormat: @"itms-apps://itunes.apple.com/app/id%@?action=write-review",@"583742532"];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:nsStringToOpen]];
}
蘋果文檔
最后編輯于 :
?著作權歸作者所有,轉載或內容合作請聯系作者
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發布,文章內容僅代表作者本人觀點,簡書系信息發布平臺,僅提供信息存儲服務。