github地址:https://github.com/PowerYang/SELUpdateAlert
业务逻辑:
当从接口判断出是否强制更新后,保存变量到本地,然后在:
appdelegate.m类中
- (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.
NSLog(@"已退出app");
//当从接口判断是强制更新,保证只要进入app,就会提示强制更新
if ([Utils getMustUpdate]) {
exit(0);
}
}