美文网首页
获取appStore市场应用实时版本号 iOS

获取appStore市场应用实时版本号 iOS

作者: 留一份空白 | 来源:发表于2020-09-16 14:57 被阅读0次

获取appstore应用版本号

    WS(ws);

    ddownStr = @"http://itunes.apple.com/lookup?id=********";

    [self defaultRequestwithURL:ddownStr withParameters:nil withMethod:kPOST withBlock:^(NSDictionary *dict, NSError *error) {

        NSLog(@"%@",dict);

        NSLog(@"🧊🧊%@",[dict objectForKey:@"results"]);

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

        NSString *currentVersion = infoDic[@"CFBundleShortVersionString"];

        if ([dict objectForKey:@"results"]) {

            NSArray *tempArr = [dict objectForKey:@"results"];

            if (tempArr.count > 0) {

                NSDictionary *tempDic = [tempArr objectAtIndex:0];

                if ([tempDic objectForKey:@"version"]) {

                    NSString *verstring = [NSString stringWithFormat:@"%@",[tempDic objectForKey:@"version"]];

                    //当前版本号

                    NSInteger currentVerRR =

                    [[(NSMutableString *)currentVersion stringByReplacingOccurrencesOfString:@"." withString:@""] intValue];

                    //最新VV

                    NSInteger cNewVerRR =

                    [[(NSMutableString *)verstring stringByReplacingOccurrencesOfString:@"." withString:@""] intValue];

                    if (cNewVerRR > currentVerRR) {

                        [ws liz_showUpdateAlertWithOldVersion:currentVersion withNew:[NSString stringWithFormat:@"%@",verstring] withUrl:dJumpStr contentStr:content];

                    }

                }

            }

        }

    }];

相关文章

  • 获取appStore市场应用实时版本号 iOS

    获取appstore应用版本号 WS(ws); ddownStr = @"http://itunes.ap...

  • oc 查询AppStore中该App的信息

    iOS开发之获取APP在AppStore中的版本号 - 简书 如何向 appstore 查询已发布 APP 的信息...

  • iOS 版本更新

    需求:当iOS应用迭代更新时,少不了更新提示 思路:通过获取appStore已上传的版本的版本号与手机当前该软件的...

  • iOS 获取系统信息

    iOS获取系统信息 当前应用软件版本 比如:1.0.1 当前应用版本号码 (编译版本号) 获取应用信息 当前应用名...

  • iOS APP版本升级

    1.获取appStore的APP数据//获取appStore版本号 #pragma mark -- 获取appSt...

  • iOS 跳转AppStore更新版本

    1、获取版本号 2、跳转到AppStore

  • 2019-05-30

    -(void)loadata{//获取appStore网络版本号AFHTTPSessionManager *man...

  • iOS获取系统信息

    iOS获取系统信息 获取版本号 获取手机序列号 获取手机型号 获取手机设备名称 获取手机别名 获取应用信息 当前应...

  • iOS基础知识总结

    1.iOS获取当前app的名称和版本号 iOS应用程序生命周期(前后台切换,应用的各种状态)详解参考:http:/...

  • 两个字符串多元化比较(CompareOptions)

    业务场景: 1、拿到AppStore最新版本号(StoreVersion)2、获取当前App的版本号(Curent...

网友评论

      本文标题:获取appStore市场应用实时版本号 iOS

      本文链接:https://www.haomeiwen.com/subject/rxthyktx.html