在iOS 10.3出现以前,App实现评价方式通常有两种:app
(一)deep link调用。在app 连接地址后面拼上action=write-review这种方式能够实现程序内评价;测试
(二)App跳转。this
NSURL*url=[NSURLURLWithString:url
@"itms-apps://itunes.apple.com/cn/app/XXX/idXXX?mt=XXX"]; 3d
[[UIApplicationsharedApplication] openURL:url];blog
在iOS 10.3出现以后,App实现评价方式又多了一种:程序内评价。苹果提供一个类SKStoreReviewController,能够帮助咱们实如今app内部的评价,使用起来很简单,代码以下:ci
[SKStoreReviewController requestReview];开发
UI效果以下:it
点赞以后的效果图以下:io
SKStoreReviewController的优势:
(一)比较人性化,用户体验好;
(二)使用简单;
SKStoreReviewController的缺点:
(一)Apple有一些相应的限制,API里有详细的说明,以下:
并且咱们在测试的时候,“提交”按钮是不能用的,官方说明以下:
"When you call this method while your app is still in development mode, a rating/review request view is always displayed so that you can test the user interface and experience. However, this method has no effect when you call it in an app that you distribute using TestFlight."
大体意思就是说测试的时候只有用到TestFlight测试,“提交”按钮才能点击。
(二)Apple 限制开发者在一年最多只能向用户调用三次评分UI。
(三)只能够评分,不能写评语;
总结
上述的三种评价方式,咱们在开发中该如何选择呢?答案很简单:根据需求来定。
原文地址:https://mp.weixin.qq.com/s?__biz=MzIxMDYzOTgyMg==&mid=2247483961&idx=1&sn=f857b27c2767b1d12f107fd155d95c82&chksm=9760cc98a017458e6bc196221c33add8213a743dfccceee6d5294edf4da0a86ff94ae3f6d0cd&mpshare=1&scene=23&srcid=0107GHlk2Y0tGQ0Y7Qyzqhxf