AppStore应用评分
2016-04-15 12:23
302 查看
1、首先设置网络访问http
2、进行AppStore应用评分需要设置地址格式:
APP_ID为itunesConnect里面应用程序的Apple ID。
第一种方式:
跳转AppStore进行应用评分代码如下:
注意:使用真机测试,模拟器会报错误:
第二种方法:
添加StoreKit.framework
导入#import
代理事件
2、进行AppStore应用评分需要设置地址格式:
itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=APP_ID
APP_ID为itunesConnect里面应用程序的Apple ID。
第一种方式:
跳转AppStore进行应用评分代码如下:
NSString *evaluateString = [NSString stringWithFormat:@"itms-apps://ax.itunes.apple.com/WebObjects/MZStore.woa/wa/viewContentsUserReviews?type=Purple+Software&id=%@",APP_ID]; [[UIApplication sharedApplication] openURL:[NSURL URLWithString:evaluateString]];
注意:使用真机测试,模拟器会报错误:
LaunchServices: ERROR: There is no registered handler for URL scheme itms-apps
第二种方法:
添加StoreKit.framework
导入#import
//方法二 //初始化控制器 SKStoreProductViewController *storeProductViewContorller = [[SKStoreProductViewController alloc] init]; //设置代理请求为当前控制器本身 storeProductViewContorller.delegate = self; //加载一个新的视图展示 [storeProductViewContorller loadProductWithParameters: //appId唯一的 @{SKStoreProductParameterITunesItemIdentifier : APP_ID} completionBlock:^(BOOL result, NSError *error) { //block回调 if(error){ NSLog(@"error %@ with userInfo %@",error,[error userInfo]); }else{ //模态弹出appstore [self presentViewController:storeProductViewContorller animated:YES completion:^{ } ]; } }];
代理事件
#pragma mark-SKStoreProductViewControllerDelegate - (void)productViewControllerDidFinish:(SKStoreProductViewController *)viewController{ [self dismissViewControllerAnimated:YES completion:^{ }]; }
相关文章推荐
- APP导航Fragment与RadioGroup
- android写京东首页
- iOS路径问题
- Swift 取子字符串
- Android Service中给其他的组件回传数据。
- android studio2.0出现的gradle问题,instant Run即时运行不了.
- android studio2.0出现的gradle问题,instant Run即时运行不了.
- iOS集成构建
- 充分掌握Android Debug Bridge(ADB)
- android EditText 自动获取焦点并弹出软键盘
- Android3.1后系统接收不到广播的问题解析
- android下拉刷新精彩动画
- Android_android签名证书的sha1值获取
- Android编程获取图片和视频缩略图的方法
- android 获取状态栏高度
- iOS小结
- Caused by: android.view.InflateException: Binary XML file line #11: Error inflating class
- iOS presentViewController 之后设置界面透明
- iOS中的动画
- ios CGRec用法