星五博客

获取APP信息

NSDictionary* infoDict =[[NSBundlemainBundle] infoDictionary];
    NSString* versionNum =[infoDict objectForKey:@"CFBundleVersion"];
    NSString* appName =[infoDict objectForKey:@"CFBundleDisplayName"];
    NSString* appName2 =[infoDict objectForKey:@"CFBundleName"];
    NSLog(@"%@|%@|%@",versionNum,appName,appName2);//1.0|鞋服零售|xfls
    if (![versionNum isEqual:@"1.01"]) {
        NSLog(@"%@需要升级",appName);
    }


IOS