App Store 升级问题
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
NSString *url = [[NSString alloc] initWithFormat:@"http://itunes.apple.com/lookup?id=%@",@"1087624011"];
NSLog(@"---------%@",url);
[self Postpath:url];
return YES;
}
-(void)Postpath:(NSString *)path
{
NSURL *url = [NSURL URLWithString:path];
NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url
cachePolicy:NSURLRequestReloadIgnoringCacheData
timeoutInterval:10];
[request setHTTPMethod:@"POST"];
NSOperationQueue *queue = [NSOperationQueue new];
[NSURLConnection sendAsynchronousRequest:request queue:queue completionHandler:^(NSURLResponse *response,NSData *data,NSError *error){
NSMutableDictionary *receiveStatusDic=[[NSMutableDictionary alloc]init];
if (data) {
NSDictionary *receiveDic = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:nil];
if ([[receiveDic valueForKey:@"resultCount"] intValue]>0) {
[receiveStatusDic setValue:@"1" forKey:@"status"];
[receiveStatusDic setValue:[[[receiveDic valueForKey:@"results"] objectAtIndex:0] valueForKey:@"version"] forKey:@"version"];
}else{
[receiveStatusDic setValue:@"-1" forKey:@"status"];
}
}else{
[receiveStatusDic setValue:@"-1" forKey:@"status"];
}
[self performSelectorOnMainThread:@selector(receiveData:) withObject:receiveStatusDic waitUntilDone:NO];
}];
}
-(void)receiveData:(id)sender
{
NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
NSString *app_Version = [infoDictionary objectForKey:@"CFBundleShortVersionString"];
NSDictionary *dictionary = (NSDictionary *)sender;
if([[dictionary objectForKey:@"version"]doubleValue]>[app_Version doubleValue]){
UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"温馨提示" message:@"你当前的app版本过低,请升级" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil, nil];
[alert show];
NSString *url = @"https://itunes.apple.com/cn/app/he-ge-zheng-guan-li/id1087624011?mt=8";
[[UIApplication sharedApplication]openURL:[NSURL URLWithString:url]];
}
}
v
App Store 升级问题的更多相关文章
- 10.8.5如何升级(app store 出错 请稍后重试 100)
出现问题:苹果以前的老版本,OS X 10.8或是10.8.5在当年提示你升级,你又任性没升级的时候,拖过那阵,你再想升级,就是各种报复.进app store下载或是更新东西都是弹出app stpre ...
- 发布报错:Error ITMS-90635 - Invalid Mach-O in bundle - submitting to App store
发布报错:Error ITMS-90635 - Invalid Mach-O in bundle - submitting to App store 昨晚上传项目到AppStore,报了这个错,纳尼! ...
- WWDC 后苹果最新 App Store 审核条款!
WWDC 2016 大会之后,苹果公司发布了四个全新平台:iOS,macOS,watchOS 和 tvOS.并且在此之后,苹果应用商店审核条款也同时进行了更新——貌似不算进行了更新,简直就是重 ...
- App Store审核被拒的23个理由
原文地址 iOS 应用提交审核要持续一周或者更久,在提交之前,我们一定要进行「自我审查」,避免被拒.ASO100 为大家收集整理了2015年 App Store 审核被拒的23个理由,并且附上官方拒绝 ...
- App Store内购
一.In App Purchase概览 Store Kit代表App和App Store之间进行通信.程序将从App Store接收那些你想要提供的产品的信息,并将它们显示出来供用户购买.当用户需要购 ...
- XCODE6 提交至 App Store
新到一个公司,以前的苹果开发人员离职,临时接手他的苹果代码,需要修改并上线到APP STORE. xcode6.0升级到最新的6.1后, 发现各种坑 1. 路径配置不对, 这个是个人习惯问题,之前的 ...
- 苹果App Store开发者帐户从申请,验证,到发布应用(4)
苹果App Store应用内支付(In-App Purchase) IAP简介 IAP的全称是In-App Purchase,应用内付费.这种业务模式允许用户免费下载试用,对应用内提供的商品选择消费, ...
- 开源一个上架 App Store 的相机 App
Osho 相机是我独立开发上架的一个相机 App,App Store地址:https://itunes.apple.com/cn/app/osho/id1203312279?mt=8.它支持1:1,4 ...
- iOS 上传App Store提示WARNING ITMS-90703错误的说明
今天上传app到appstore的时候,上传到最后一步的时候,报了一个警告: 原文如下: WARNING ITMS-90703: "Deprecated Xcode Build. Due t ...
随机推荐
- OGG中断后,重新同步操作
模拟一下goldengata中断后,重新同步操作: 1.关掉源端抽取进程 GGSCI (20081122-2105) 15> info all Program Status Group Lag ...
- 计算机网络课程优秀备考PPT之第六章传输层(六)
为了记录自己从2016.9~2017.1的<计算机网络>助教生涯,也为了及时梳理和整写笔记! 前期博客是, 计算机网络课程优秀备考PPT之第一章概述(一) 计算机网络课程优秀备考PPT之第 ...
- Jmeter 多台机器产生负载
使用多台机器产生负载的操作步骤如下: (1)在所有期望运行jmeter作为 负载生成器的机器上安装jmeter, 并确定其中一台机器作为 controller ,其他的的机器作为agent .然后运行 ...
- Beef
修改配置文件/usr/share/beef-xss/config.yaml (1)改vi beef侦听端口: http: port:3000(改为80) (2)与Metaspolit关联: ...
- 微信支付错误两个问题的解决:curl出错,错误码:60
如下是运行微信支付测试代码时出错代码: Warning: curl_setopt() expects parameter 2 to be long, string given in D:\wwwroo ...
- git config and options core.bare hard
In Lynda course Building a Web Interface with React.js 003 Using the exercises > git clone --bare ...
- linux命令readlink
readlink,从字面意思就可以看出来,输出符号链接值或者权威文件名. openwrt 下的readlink命令参数如下: root@hbg:/# readlink --helpBusyBox v ...
- a标签中使用img后的高度多了几个像素
a元素下有一个匿名文本,这个文本外有一个匿名行级盒子,它有的默认vertical-align是baseline的,而且往往因为上文line-height的影响,使它有个line-height,从而使其 ...
- 5.编写Java应用程序。首先,定义描述学生的类——Student,包括学号(int)、 姓名(String)、年龄(int)等属性;二个方法:Student(int stuNo,String name,int age) 用于对对象的初始化,outPut()用于输出学生信息。其次,再定义一个主类—— TestClass,在主类的main方法中创建多个Student类的对象,使用这些对象来测 试St
Student类: package com.bao; public class Student { int stuNo;String name,sex;int age,weight; Student( ...
- CentOS安装配置Tomcat7
1.下载apache-tomcat-7.0.62.tar.gz 2.解压:tar -zxvf apache-tomcat-7.0.62.tar.gz 3.配置环境变量: 进入安装目录:(/usr/lo ...