OGeek|极客世界-中国程序员成长平台

标题: IOS 11评论页面未打开 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-12 13:39
标题: IOS 11评论页面未打开

我可以在 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中做到这一点?



Best Answer-推荐答案


您使用 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/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://ogeek.cn/) Powered by Discuz! X3.4