ios开发之app内启动用户评价
2016-02-26 09:20
477 查看
恰当的指引用户去给app评分是获得用户反馈的一种不错的途径。
“通过custom url scheme启动应用程序”这篇文章里讲了通过url启动地图、邮件等程序,当然也可以通过url启动AppStore中软件的用户评价界面。
NSString *url = [NSString stringWithFormat:@"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%d",490062954];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];
490062954是程序的Apple ID,可以在
![](https://itc.mzstatic.com/itc/images/itc-masthead.png)
中查到。
比如在用户使用一段时间后,弹出一个对话框提醒用户去评价:
NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"];
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:[NSString stringWithFormat:@"去给'%@'打分吧!",appName]
message:@"您的评价对我们很重要"
delegate:self
cancelButtonTitle:nil
otherButtonTitles:@"稍后评价",@"去评价",nil];
[alertView show];
[alertView release];
在点击“去评价”按钮时就可以使用上面的方法打开用户评价的url。
我在对话框中通过传递appName这个参数显示了软件名称,当然也可以显示其他软件信息,比如软件版本:
“通过custom url scheme启动应用程序”这篇文章里讲了通过url启动地图、邮件等程序,当然也可以通过url启动AppStore中软件的用户评价界面。
NSString *url = [NSString stringWithFormat:@"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%d",490062954];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:url]];
490062954是程序的Apple ID,可以在
![](https://itc.mzstatic.com/itc/images/itc-masthead.png)
中查到。
比如在用户使用一段时间后,弹出一个对话框提醒用户去评价:
NSString *appName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"];
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:[NSString stringWithFormat:@"去给'%@'打分吧!",appName]
message:@"您的评价对我们很重要"
delegate:self
cancelButtonTitle:nil
otherButtonTitles:@"稍后评价",@"去评价",nil];
[alertView show];
[alertView release];
在点击“去评价”按钮时就可以使用上面的方法打开用户评价的url。
我在对话框中通过传递appName这个参数显示了软件名称,当然也可以显示其他软件信息,比如软件版本:
NSString *appVersion = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"]; “CFBundleDisplayName”和“CFBundleVersion”都是info.plist文件中的key
相关文章推荐
- iOS 9 学习系列: Apple Pay
- kidd风的IOS日志之常用小功能小结
- kidd风的IOS日志之常用代码片段小结
- iOS App开发中导航栏的创建及基本属性设置教程
- 关于Unity里NGUI的背包
- android getAudioSessionId()函数的介绍
- Xamarin.Forms教程下载安装Xamarin.iOS
- Android RenderScript 高性能计算
- iOS8毛玻璃特效
- Error:Execution failed for task ':app:transformClassesWithDexForDebug&#
- Fragment初学8——Fragment在Android开发中的应用2
- 移动App测试中的最佳做法
- android:gravity
- ios-遍历和排序
- IOS-真机调试
- Android CTS(兼容性测试)整个流程
- nagios插件之监控f5主备状态(snmp实现)
- 关于h5手机端上拉加载和下拉刷新效果-1
- 【Android】13.3 使用SQLite.NET-PCL访问SQLite数据库
- 【Android】13.2 使用自定义的CursorAdapter访问SQLite数据库