跳转到AppStore让用户能够给我们的应用进行评分,有两种方法,一种是跳出应用,跳转到AppStore,进行评分.另一种是在应用内,内置AppStore进行评分.

PS:appleID在https://itunesconnect.apple.com中创建应用即可在应用界面获得

1.跳出应用,跳转到AppStore,进行评分

如果是7.0以前的系统

NSString *str = [NSString stringWithFormat:@"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=xxxxxx" ];

[[UIapplication sharedApplication] openURL:[NSURL URLWithString:str]];

如果是7.0以后的系统

NSString *str = [NSString stringWithFormat:@"itms-apps://itunes.apple.com/app/idxxxxxxx"];

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:str]];

2.在应用内,内置AppStore进行评分

苹果提供了一个框架StoreKit.framework,导入StoreKit.framework,在需要跳转的控制器里面添加头文件 #import <StoreKit/StoreKit.h>, 实现代理方法:< SKStorePRoductViewControllerDelegate >

//自定义方法

- (void)loadAppStoreController

{

// 初始化控制器

SKStoreProductViewController *storeProductViewContorller = [[SKStoreProductViewController alloc] init];

// 设置代理请求为当前控制器本身

storeProductViewContorller.delegate = self;

[storeProductViewContorller loadProductWithParameters:@{SKStoreProductParameterITunesItemIdentifier:kAppId}  completionBlock:^(BOOL result, NSError *error)   {

if(error)

{

NSLog(@"error %@ with userInfo %@",error,[error userInfo]);

}  else

{

// 模态弹出appstore

[self presentViewController:storeProductViewContorller animated:YES completion:^{

}];

}

}];

}

//AppStore取消按钮监听

- (void)productViewControllerDidFinish:(SKStoreProductViewController *)viewController

{

[self dismissViewControllerAnimated:YES completion:^{

}];

}

跳转appStore评分的更多相关文章

  1. iRate---一个跳转AppStore评分弹窗

    https://www.aliyun.com/jiaocheng/357479.html 摘要:gitHub地址:https://github.com/nicklockwood/iRate可以通过配置 ...

  2. 47.iOS跳转AppStore评分和发送邮件

    1.跳转到AppStore评分 应用地址是关键:IOS 设备,手机搜索应用,拷贝链接 NSString *appStr =@"https://itunes.apple.com/cn/app/ ...

  3. 跳转AppStore 评分

    -(void)goToAppStore { NSString *str = [NSString stringWithFormat: @"itms-apps://ax.itunes.apple ...

  4. ios------app跳转到appStore评分

    跳转到AppStore评分,有两种方法: 一种是跳出应用,跳转到AppStore,进行评分: 另一种是在应用内,内置AppStore进行评分. PS:appID在https://itunesconne ...

  5. App 打包并跳过 AppStore 的发布下载

    一.App 打包 (编译 -> 链接 -> 打包) 1) 下载发布版的证书并安装. 2)Target -> Build Setting,改为发布版本的 profile 3) Targ ...

  6. iOS7跳转AppStore地址

    跳转AppStore地址改变: 由 itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews? ...

  7. IOS6.0 应用内直接下载程序 不需跳转AppStore -b

    闲来没事看了篇文章 应用内创建应用商店环境,不跳转AppStore. 先武断的想一句:放屁.然后好奇的进去看看,原来是IOS6.0的新特性,顿感惭愧.研究下 SKStoreProductViewCon ...

  8. 如何从应用直接跳转AppStore 电话 短信 邮件

    //如何从应用直接跳转AppStore [[UIApplication sharedApplication]openURL:[NSURL URLWithString:@"应用程序的下载链接& ...

  9. 微信无法跳转appstore总结--应用宝微下载申请

    以前是有方法,可以实现微信下跳转appstore的. 大概就是把url改为:http://mp.weixin.qq.com/mp/redirect?url="跳转url"(可编码也 ...

随机推荐

  1. struts_hibernate登陆范例

    开发工具:MyEclipse 6.0 ,Tomcat 5.5 ,JDK 1.5  ,MySQL 5.0 :开发准备:下载Struts 2.0和Hibernate 3.2,大家可Struts和Hiber ...

  2. SecureCRT设置超级终端

    SecureCRT可以代替Windows中的超级终端,用来连接网络设备的Console口新建连接Serial串口,配置为:Bits per second: 9600Data bits: 8Parity ...

  3. http各类攻击及tcpcopy工具

    1.专业的还得ixia.Spirent TestCenter等软硬件一体的 2.一般的使用软件的,安装在linux上使用 参考: 1.http://blog.csdn.net/wuzhimang/ar ...

  4. SSD配置

    SSD: Single Shot MultiBox Detector - 运行“ make -j32”时出错: nvcc warning : The 'compute_20', 'sm_20', an ...

  5. 【温故知新】——CSS黑魔法小技巧可以少些不必要的js

    前言:这篇文章是转载[前端开发博客]的一篇技术文章,并非本人所写.只是个人觉得很实用,所以分享给大家.原文链接:github.com 1.利用 CSS 的 content 属性 attr 抓取资料需求 ...

  6. 转: java服务器端成长指南

    from:  http://m.blog.csdn.net/article/details?id=45797155 前言 这是一份针对新手的服务端开发入门与进阶指南.遇到问题及时问你的 mentor ...

  7. 使用eclipse搭建maven多module项目(构建父子项目)

    创建空maven项目 File–>new–>project… 2.next 3.next 4.finish 5.配置pom.xml <project xmlns="http ...

  8. VC6 在使用VC助手(Visual AssistX)在Win7下不能使用↑↓←→及回车键选择的解决的方法

    VC6使用Visual AssistX版本号的问题,换一个版本号.如"Visual Assist X 10.8.2029"就可以解决. http://pan.baidu.com/w ...

  9. [Android]egit取消文件版本号控制

    开发项目,多人合作开发变得越来越重要了,在此同一时候,使用git作为协同工具也是越来越多.在此.介绍一下egit取消文件版本号控制的方法. (egit即为eclipse中的git插件) 1.打开Nav ...

  10. int a; int* a; int** a; int (*a)[]; int (*a)(int)

    a) int a;表示一个内存空间,这个空间用来存放一个整数(int):b) int* a;表示一个内存空间,这个空间用来存放一个指针,这个指针指向一个存放整数的空间,即a)中提到的空间:c) int ...