zoukankan      html  css  js  c++  java
  • ios显示手机信息

    NSString *strname=[[UIDevice currentDevice] name];

        NSLog(@"设备名:%@",strname);

        

        

        

        NSString *strSysName = [[UIDevice currentDevice] systemName];

        NSLog(@"系统名称:%@", strSysName);// e.g. @"iOS"

        

        NSString *strSysVersion = [[UIDevice currentDevice] systemVersion];

        NSLog(@"系统版本号:%@", strSysVersion);// e.g. @"4.0"

        

        NSString *strModel = [[UIDevice currentDevice] model];

        NSLog(@"设备模式:%@", strModel);// e.g. @"iPhone", @"iPod touch"

        

        NSString *strLocModel = [[UIDevice currentDevice] localizedModel];

        NSLog(@"本地设备模式:%@", strLocModel);// localized version of model

        

        

        

        

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

        //    CFShow(dicInfo);

        

        NSString *strAppName = [dicInfo objectForKey:@"CFBundleDisplayName"];

        NSLog(@"App应用名称:%@", strAppName);

        

        NSString *strAppVersion = [dicInfo objectForKey:@"CFBundleShortVersionString"];

        NSLog(@"App应用版本:%@", strAppVersion);

        

        NSString *strAppBuild = [dicInfo objectForKey:@"CFBundleVersion"];

        NSLog(@"App应用Build版本:%@", strAppBuild);

        

        

        

        NSArray *languageArray = [NSLocale preferredLanguages];

        NSString *language = [languageArray objectAtIndex:0];

        NSLog(@"语言:%@", language);//en

        

        NSLocale *locale = [NSLocale currentLocale];

        NSString *country = [locale localeIdentifier];

        NSLog(@"国家:%@", country); //en_US

     

  • 相关阅读:
    第四章 虚拟机性能监控与故障处理工具
    C++_异常5-异常规范和栈解退
    C++_异常4-将对象用作异常类型
    C++_异常3-异常机制throw try catch
    C++_异常2-返回错误码
    C++_异常1-调用abort()
    C++_类继承7-类设计回顾
    C++_类继承6-继承和动态内存分配
    C++_类继承5-抽象基类
    C++_类继承4-访问控制protected
  • 原文地址:https://www.cnblogs.com/haiying/p/4174783.html
Copyright © 2011-2022 走看看