iOS 11 评论页面打不开

标签 ios objective-c xcode ios11

在 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 指示开发人员使用 SKStore​Review​Controller :

SKStore​Review​Controller: 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/

相关文章:

ios - PFUsers 共享所有相同的 PFObjects?

iphone - UITableView 单元格采用 UITableView 背景图像的图案颜色

ios - Swift - 如何在单元测试中禁用网络

ios - 将颜色渐变添加到圆形进度条 iOS

ios - 比较并获取存储在两个 NSDictionary 中的对象

iphone - 在 TabBar 中的 View Controller 之间共享 UIImageView

objective-c - 贝塞尔路径带圆角矩形 : -- odd rendering artefact

ios - 缺少两个 dylib,但没有 Xcode 链接错误

ios - 如何在 iOS 13 的 Swift 中立即更改状态栏文本颜色

iphone - 我应该在哪里删除通知观察者?