ios版本跟新
来源:互联网 发布:制作广告录音的软件 编辑:程序博客网 时间:2024/04/27 20:06
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
//966061242 密云360
[manager POST:@"http://itunes.apple.com/cn/lookup?id=966061242" parameters:nil success:^(AFHTTPRequestOperation *_Nonnull operation, id _Nonnull responseObject) {
NSLog(@"responseObject:%@", responseObject);
NSArray *array = responseObject[@"results"];
NSDictionary *dict = [array lastObject];
double doubleUpdateVersion = [dict[@"version"] doubleValue];
NSLog(@"当前版本为:%@", dict[@"version"]);
NSDictionary*infoDict=[[NSBundle mainBundle]infoDictionary];
NSString*currentVersion=[infoDict objectForKey:@"CFBundleShortVersionString"];
NSLog(@"currentVersion:%@", currentVersion);
double doubleCurrentVersion=[currentVersion doubleValue];
if(doubleCurrentVersion<doubleUpdateVersion){
[UIAlertView alertViewWithTitle:@"云帮网" message:@"下载更新新的版本" block:^(NSInteger buttonIndex) {
if (buttonIndex ==1) {
NSString *iTunesString = [NSString stringWithFormat:@"http://itunes.apple.com/app/id%@",@"966061242"];
NSURL *iTunesURL = [NSURL URLWithString:iTunesString];
[[UIApplication sharedApplication] openURL:iTunesURL];
}
} cancelButtonTitle:@"取消" otherButtonTitles:@"确定",nil];
}
} failure:^(AFHTTPRequestOperation * _Nullable operation, NSError *_Nonnull error) {
}];
- ios版本跟新
- appcan 版本跟新
- 版本跟新
- [iOS AppStore] 根据AppStore中的App版本 做跟新提示
- 版本跟新 导入类名 Conf
- 苹果版本跟新的提示
- iOS 面试题整理(持续跟新)
- 个人收集的iOS开源动画-----长期跟新
- iOS开发 JSPatch实现热跟新及热修复
- iOS开发debug跟release版本log屏蔽方法
- iOS开发debug跟release版本log屏蔽方法
- iOS开发debug跟release版本NSLog屏蔽方法
- iOS开发debug跟release版本NSLog屏蔽方法
- iOS开发debug跟release版本log屏蔽方法
- iOS开发debug跟release版本NSLog屏蔽方法
- iOS 新特性的设置版本配置
- 【iOS开发系列】版本新特性界面
- iOS不同版本的新特性小结
- 51nod oj 1094 和为k的连续区间【纯暴力--二分求解】
- sleep()和wait()的区别
- 斯坦福第三章:logistic回归中的权系数迭代公式
- 大数相加算法
- 《懒人Shell脚本》之四——日志条数动态实时统计
- ios版本跟新
- Android提醒微技巧,你真的了解Dialog、Toast和Snackbar吗? 转载出处:http://blog.csdn.net/guolin_blog/article/details/
- SwipeRefreshLayout 下拉刷新
- 剑指Offer_06_旋转数组的最小数字
- 数据结构实验之二叉树五:层序遍历
- ubutu14.04下ftp服务器搭建
- 【win32】day06-系统菜单/右键菜单/资源的使用/字符串资源/菜单资源/加速键资源
- java/MySql
- android学习—— context 和 getApplicationContext()