美文网首页
iOS 强制版本更新

iOS 强制版本更新

作者: 景超叔叔 | 来源:发表于2019-08-01 15:50 被阅读0次
    非强制更新 强制更新

    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);
        }
    }
    

    相关文章

      网友评论

          本文标题:iOS 强制版本更新

          本文链接:https://www.haomeiwen.com/subject/lkzfdctx.html