常用的设备及APP属性

 
    //    IOS-获取Model(设备型号)、Version(设备版本号)、app(程序版本号)等
    NSLog(@"name: %@", [[UIDevice currentDevice] name]);
    NSLog(@"systemName: %@", [[UIDevice currentDevice] systemName]);
    NSLog(@"systemVersion: %@", [[UIDevice currentDevice] systemVersion]);
    NSLog(@"model: %@", [[UIDevice currentDevice] model]);
    NSLog(@"localizedModel: %@", [[UIDevice currentDevice] localizedModel]);
    
    NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
    
    CFShow((__bridge CFTypeRef)(infoDictionary));
    
    // app名称
    NSString *app_Name = [infoDictionary objectForKey:@"CFBundleDisplayName"];
    NSLog(@"name: %@", app_Name);

    // app版本
    NSString *app_Version = ;
    NSLog(@"name: %@", app_Version);

    // app build版本
    NSString *app_build = [infoDictionary objectForKey:@"CFBundleVersion”];


UIDevice *device = [UIDevice currentDevice];
    float sysVersion = [device.systemVersion floatValue];
    原文作者:Eidesen
    原文地址: https://segmentfault.com/a/1190000004268009
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞