IOS 11 评论页面打不开
IOS 11 Review page not opening
我可以使用下面的代码在应用程序商店中打开评论页面 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 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];