码迷,mamicode.com
首页 > 移动开发 > 详细

iOS Appstore 版本更新

时间:2017-06-13 16:51:24      阅读:247      评论:0      收藏:0      [点我收藏+]

标签:pps   elb   version   current   打开   nbsp   arc   上线   undle   

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

 

iOS Appstore 版本更新

标签:pps   elb   version   current   打开   nbsp   arc   上线   undle   

原文地址:http://www.cnblogs.com/code-Officer/p/7001224.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!