在 iOS 10 中,我可以使用下面的代码在应用商店中打开评论页面,但在 IOS 11 中就不能了。
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"itms-apps://itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=xxxxxxxx&pageNumber=0&sortOrdering=2&mt=8"]]];
如何在 iOS 11 中做到这一点?
最佳答案
您使用 URL 打开评论页面的方法已被弃用。从 iOS 10.3 及更高版本开始,Apple 指示开发人员使用 SKStoreReviewController
:
SKStoreReviewController
: An object that controls the process of requesting App Store ratings and reviews from users.
Objective-C 使用代码:
// Import the store kit
@import StoreKit
// Use the controller to open the review URL
[SKStoreReviewController requestReview];
关于iOS 11 评论页面打不开,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46217605/