zoukankan      html  css  js  c++  java
  • AFNetWorking 判断当前版本是否是最新版本

      NSString *url = [[NSString alloc] initWithFormat:@"http://itunes.apple.com/lookup?id=%@",@"***"];

        [self reqeautDataUrl:url parma:nil block:^(NSDictionary *dataDic, NSError *error) {

            [self hideHud];

            if(error){

                [self showAlertView:@"版本获取失败"];

                return ;

            }

             NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];

            NSString *app_Version = [infoDictionary objectForKey:@"CFBundleShortVersionString"];

            if([[dataDic objectForKey:@"version"] isEqualToString:app_Version]){

                UIActionSheet *actionSheet = [[UIActionSheet alloc]initWithTitle:@"提示" delegate:nil cancelButtonTitle:@"确定" destructiveButtonTitle:@"已经是最新版本" otherButtonTitles:nil, nil];

                [actionSheet showInView:self.view];

            }else {

                UIActionSheet *actionSheet = [[UIActionSheet alloc]initWithTitle:@"提示" delegate:nil cancelButtonTitle:@"确定" destructiveButtonTitle:@"请更新最新的版本" otherButtonTitles:nil, nil];

                [actionSheet showInView:self.view];

            }

        }];

  • 相关阅读:
    第6次实践作业
    第5次实践作业
    第4次实践作业
    第3次实践作业
    第二次实践作业
    2020系统综合实践 第1次实践作业
    软工实践个人总结
    第11组 Beta版本演示
    第11组 Beta冲刺(4/5)
    第11组 Beta冲刺(5/5)
  • 原文地址:https://www.cnblogs.com/hualuoshuijia/p/5408001.html
Copyright © 2011-2022 走看看