iOS 取应用版本

时间:2014-10-15 16:57:52   收藏:0   阅读:287
?//	应用网址 返回字典中有多种数据
NSString *urlString2 = [NSString stringWithFormat: @"%@", @"http://itunes.apple.com/lookup?id=应用ID"];

NSDictionary* infoDict =[[NSBundle mainBundle] infoDictionary];
NSString* key =[infoDict objectForKey:@"CFBundleVersion"];

//	如果有新版本 使用UIAletView显示

NSString *newVersionUrl = dic[@"trackViewUrl"];
                
[[UIAlertView alloc] initWithTitle: @"新版本可用" message: dic[@"releaseNotes"] delegate: self cancelButtonTitle: @"稍后更新" otherButtonTitles: @"立刻升级", nil] show];
?

原文:http://www.cnblogs.com/jz319/p/4026509.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!