要想规避苹果审查,我们需要通过调用数据接口来控制调用app 版本强制更新功能:当苹果在审查的时候,我们可以通过后台数据控制关闭版本强制更新功能,等苹果审核通过以后我通过后台控制打开版本强制更新功能。下面是app 版本强制更新功能实现的代码:

AppDelegate.h文件
#import <UIKit/UIKit.h>@interface AppDelegate : UIResponder <UIApplicationDelegate,UIAlertViewDelegate>@property (strong, nonatomic) UIWindow *window;@endAppDelegate.m文件
#import "AppDelegate.h"
#import "ViewController.h"
@interface AppDelegate ()
{ViewController *vc;
}
@end@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {self.window = [[UIWindow alloc]initWithFrame:[[UIScreen mainScreen] bounds]];self.window.backgroundColor = [UIColor whiteColor];vc = [[ViewController alloc]init];UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:vc];self.window.rootViewController = nav;return YES;
}- (void)applicationWillResignActive:(UIApplication *)application {// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}- (void)applicationDidEnterBackground:(UIApplication *)application {// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}- (void)applicationWillEnterForeground:(UIApplication *)application {[vc checkVersion];// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}- (void)applicationDidBecomeActive:(UIApplication *)application {// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}- (void)applicationWillTerminate:(UIApplication *)application {// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}@endViewController.h文件
#import <UIKit/UIKit.h>@interface ViewController : UIViewController-(void)checkVersion;
@endViewController.m文件#import "ViewController.h"@interface ViewController ()
@end@implementation ViewController- (void)viewDidLoad {[super viewDidLoad];self.title = @"版本检测更新";self.view.backgroundColor = [UIColor whiteColor];[self checkVersion];   //检测升级}-(void)checkVersion
{NSString *newVersion;NSURL *url = [NSURL URLWithString:@"http://itunes.apple.com/cn/lookup?id=1139094792"];//1137865162NSString *jsonResponseString = [NSString stringWithContentsOfURL:url encoding:NSUTF8StringEncoding error:nil];
//    NSLog(@"通过appStore获取的数据信息:%@",jsonResponseString);NSData *data = [jsonResponseString dataUsingEncoding:NSUTF8StringEncoding];id json = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:nil];NSArray *array = json[@"results"];for (NSDictionary *dic in array) {newVersion = [dic valueForKey:@"version"];}//    NSLog(@"通过appStore获取的版本号是:%@",newVersion);//    解析json数据//获取本地软件的版本号NSString *localVersion = [[[NSBundle mainBundle]infoDictionary] objectForKey:@"CFBundleVersion"];NSString *msg = [NSString stringWithFormat:@"你当前的版本是V%@,发现新版本V%@,请更新新版本哦!",localVersion,newVersion];//对比发现的新版本和本地的版本if ([newVersion floatValue] > [localVersion floatValue]){UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"升级提示"message:msg preferredStyle:UIAlertControllerStyleAlert];[self presentViewController:alert animated:YES completion:nil];[alert addAction:[UIAlertAction actionWithTitle:@"现在升级" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://itunes.apple.com/cn/app/yi-ka-tongbic-ban/id1139094792?l=en&mt=8"]];//1137865162
//            NSLog(@"点击现在升级按钮");}]];}
}- (void)didReceiveMemoryWarning {[super didReceiveMemoryWarning];// Dispose of any resources that can be recreated.
}@end

君凯商联网-iOS-字唐名僧

iOS 规避苹果审查,实现app store上的app版本强制更新相关推荐

  1. App Store 上传app后不能构建版本,构建版本发现不了已上传app , 没有➕号 一定要查看App Store账号邮箱

    1.首先要看用什么工具上传的 第一次往App Store上传app最好用Application Loader 不要用xcode直接上传因为 xcode直接上传如果app当中有问题不会报错,比如icon ...

  2. 如何规避苹果审查,实现app store上的app版本强制更新

    要想规避苹果审查,我们需要通过调用数据接口来控制调用app 版本强制更新功能:当苹果在审查的时候,我们可以通过后台数据控制关闭版本强制更新功能,等苹果审核通过以后我通过后台控制打开版本强制更新功能.下 ...

  3. App Store上推广App的实战经验

    分享到:新浪微博 如今周围层出不穷的移动创富故事,很容易让人心血沸腾,似乎自己也能创造出下一个<愤怒的小鸟>,空中网洪亮说自己在09年的时候也这样想过,并且还实际组队做个几个产品,结果销量 ...

  4. 苹果:我们一直在App Store上展示竞争对手的应用程序

    5月8日消息,据国外媒体报道,Epic Games对苹果的法律大战拉开序幕后,每天Epic公司都会分享苹果高管和员工之间的新邮件,作为起诉苹果公司的证据.在最新的证据中,负责苹果应用程序商店的副总裁说 ...

  5. 【iOS】获取App Store上的.ipa包

    在仿写一些程序时,避免不了获取它的图片素材等等,那么最快也是最有效的方式就是获取原程序的ipa包.更或者,你想要逆向分析某一款APP时,那么只有获取了ipa后才能进行class-dump,ida等等后 ...

  6. 苹果App Store审核指南中文翻译(更新)

    http://www.cocoachina.com/ios/20140227/7892.html (注:<苹果应用商店审核指南>中文翻译最近一次更新为2013-03-04,文中红色部分是相 ...

  7. 准备在App Store上发布您的应用程序

    由donnywals于2019年12月24日发布 您已经完成了构建应用程序的所有工作,UI看起来很棒,动画很流畅,并且可以将应用程序移交给其他人了. 也许您甚至已经准备好开始在App Store上提供 ...

  8. App Store上下载和安装Xcode

    App Store上下载和安装Xcode Xcode的下载和安装 要编写一个Sprite Kit程序,需要使用到Xcode开发工具.本节将主要讲解此工具的两种下载和安装方式:一种是在App Store ...

  9. 七麦研究院首发AR产品数据报告,数读App Store上的AR世界

    AR 是增强现实的一种科学技术,同时也是将虚拟信息与真实世界巧妙融合的技术.从 2015 年开始,AR 行业投融资开始爆发,风口正式确立,资本迅速涌入.基于此,七麦研究院重磅发布<2019 年 ...

最新文章

  1. 【置顶】利用 NLP 技术做简单数据可视化分析教程(实战)
  2. 使用TestStack.White进行Windows UI的自动化测试 (1) 基础篇
  3. boostshared_ptr
  4. 登录form php一个页面跳转页面,Extjs4中表单登录功能、登录成功跳转页面的代码...
  5. 安装好MySQL数据库之后dos下操作步骤及建表命令
  6. 作为多年 PHP 的开发者,在使用了 Go 语言之后......
  7. PAIP.http post 400错误
  8. Java视频在线观看网址
  9. 浅谈大数据时代的电子招投标
  10. 手写NMS和魔改(Pytorch版本)
  11. Linux笔记:开机自动运行程序
  12. 街头篮球服务器未响应,我的生涯我做主 《街头篮球》生涯联赛FAQ
  13. 情感分析学习笔记(5)——PolarityRank算法原理讲解
  14. Open Judge 百练 1003 宿醉(C语言)
  15. 华为开发者联盟上架应用 完结
  16. ATH9K Driver Learning Part VI: Difference Between Packet Preparation And Transmission Control
  17. 多边形交叉区域计算面积_使用GPC或Clipper计算多边形交叉区域
  18. 360安全卫士去广告、去多余按钮、与金山网盾等软件共存方法组合
  19. k8s日志通过本地iTerm查看
  20. mac和window电脑 解决github打不开问题

热门文章

  1. jQuery绑定事件的方法四种方法
  2. MDaemon邮件列表的使用(一):邮件列表的创建及简单管理
  3. opencv java图像二值化处理
  4. Excel文件打开时出现“***中的部分内容有问题,是否让我们尽量尝试恢复?”的解决方法
  5. Hive-SQL取一个月用户留存率、留存用户数
  6. 【数据分析与挖掘实战】电信用户流失分析与预测
  7. 计算机右下方出现更新图标提示,win10系统桌面右下角升级提示图标删除不了怎么办?...
  8. 基于JAVA橱柜定制系统计算机毕业设计源码+系统+lw文档+部署
  9. ZOJ 1655 Transport Goods 最短路变形
  10. mysql下载云盘_mysql5.5安装教程:mysql下载与安装