因为苹果作了自动升级,全部只要在应用程序中出现从AppStore检查版本更新,或者出现任何有关升级的提醒都会被拒,可是若是必须添加升级提示的话,能够配合后台经过添加API的方式来作,就是版本信息存储在服务器,应用只须要请求数据,拿到数据版本而后和当前的版本比较就能够了,因为是从服务器拿数据,因此在审核期间,让后台控制版本,不提示升级问题,审核经过以后,更改服务器版本到最新版就能够了。服务器
跳转到appstore 以下:app
[[UIApplication sharedApplication]openURL:[NSURL URLWithString:@"itms-apps://itunes.apple.com/cn/app/id1288515707"]];
//拿服务器的版本与当前的比较
// 获取当前版本 -(NSString *)version { NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary]; NSString *app_Version = [infoDictionary objectForKey:@"CFBundleShortVersionString"]; return app_Version; }
登陆苹果开发者帐号 --> 登陆帐号--> 点击iTunes Connect --> go to iTunes Connect --> My App (个人App) --> 点击App Store 栏下的 APP 信息 --> 向下滑会看到 Apple ID 这个就是跳转到应用程序须要的id

NSString *url = [[NSString alloc] initWithFormat:@"http://itunes.apple.com/lookup?id=%@",id]; // id就是线上产品的ID 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){ receiveStatusDic=[[NSMutableDictionary alloc]init]; if (data) { NSDictionary *receiveDic = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableLeaves error:nil]; NSLog(@"receiveDic is %@",receiveDic); //字典receiveDic中就包含版本信息 }
信息入下
{ resultCount = 1; receiveDic = ( { artistId = 开发者 ID; artistName = 开发者名称; price = 0; isGameCenterEnabled = 0; kind = software; languageCodesISO2A = ( EN ); trackCensoredName = 审查名称; trackContentRating = 评级; trackId = 应用程序 ID; trackName = 应用程序名称"; trackViewUrl = 应用程序介绍网址; userRatingCount = 用户评级; userRatingCountForCurrentVersion = 1; version = 版本号; wrapperType = software; } ); }