首页 > 代码库 > 检查更新的version获取 注意事项
检查更新的version获取 注意事项
// 检查更新
- (void)updateVersion
{
// 获取app版本
NSDictionary *infoDictionary = [[NSBundlemainBundle] infoDictionary];
NSString *currentVersion = [infoDictionary objectForKey:@"CFBundleVersion"]; //target里的build
// 向服务器请求
[selfrequestCheckUpdateDataWithDic:@{
@"system": @"2",
@"versionCode": currentVersion
}];
}
// 获取app版本 (仅仅打印出"字符串"给用户看)
NSDictionary *infoDictionary = [[NSBundlemainBundle] infoDictionary];
NSString *app_Version = [infoDictionary objectForKey:@"CFBundleShortVersionString"]; //target里的version
注意事项的链接 http://blog.csdn.net/holydancer/article/details/8895699
检查更新的version获取 注意事项