首页 > 代码库 > iOS Appstore 版本更新
iOS Appstore 版本更新
1,版本更新 通过比较构建号/版本号 检查更新
/// 构建号 50 // NSString * currentVersion = [NSBundle mainBundle].infoDictionary[@"CFBundleVersion"]; /// 版本号 2.2.0 //CFBundleShortVersionString NSString * currentVersion = [NSBundle mainBundle].infoDictionary[@"CFBundleShortVersionString"]; NSLog(@"receiveData=http://www.mamicode.com/%@",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 版本更新
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。