码迷,mamicode.com
首页 > 移动开发 > 详细

ios显示手机信息

时间:2014-12-19 23:18:17      阅读:178      评论:0      收藏:0      [点我收藏+]

标签:

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

 

ios显示手机信息

标签:

原文地址:http://www.cnblogs.com/haiying/p/4174783.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!