zoukankan      html  css  js  c++  java
  • iOS Appstore 版本更新

    1,版本更新 通过比较构建号/版本号 检查更新

    ///  构建号 50
    //    NSString * currentVersion = [NSBundle mainBundle].infoDictionary[@"CFBundleVersion"];
        /// 版本号 2.2.0
        //CFBundleShortVersionString
        NSString * currentVersion = [NSBundle mainBundle].infoDictionary[@"CFBundleShortVersionString"];
       
        NSLog(@"receiveData=%@",sender);
        //    sender[@"version"]  @"1.1.3"
        if ( [sender[@"version"] compare:currentVersion options:NSNumericSearch] == NSOrderedDescending) {
            UIAlertView *alert = [[UIAlertView alloc]initWithTitle:@"提示" message:@"有新版本更新,是否前往AppStore下载" delegate:self cancelButtonTitle:@"不去" otherButtonTitles:@"立即前往", nil];
            alert.tag = 1000;
            /// 上线前打开
            [alert show];
        }
    /*
         线上  compare  本地
        if ( [@"1.2.0" compare:@"1.1" options:NSNumericSearch] == NSOrderedDescending) {
            NSLog(@"1.2>1.1.1");
        }
         */
  • 相关阅读:
    命名规则
    数据库的基本概念(三大范式,数据)
    集合的排序
    装箱拆箱
    异常处理
    单行函数
    表管理
    创建表,插入列....
    PL/SQL 块
    单行函数的案例
  • 原文地址:https://www.cnblogs.com/code-Officer/p/7001224.html
Copyright © 2011-2022 走看看