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];

 

        }

    }];

 

相关文章:

  • 2021-12-30
  • 2022-12-23
  • 2022-12-23
  • 2021-12-10
  • 2021-10-01
  • 2021-12-14
  • 2022-02-04
猜你喜欢
  • 2022-12-23
  • 2021-04-10
  • 2021-12-04
  • 2022-12-23
  • 2021-09-08
  • 2022-12-23
相关资源
相似解决方案