github地址:https://github.com/PowerYang/SELUpdateAlert
業(yè)務(wù)邏輯:
當(dāng)從接口判斷出是否強(qiáng)制更新后,保存變量到本地颁糟,然后在:
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");
//當(dāng)從接口判斷是強(qiáng)制更新,保證只要進(jìn)入app抵恋,就會(huì)提示強(qiáng)制更新
if ([Utils getMustUpdate]) {
exit(0);
}
}