本文主要是介绍获取手机设备信息 总汇,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
NSString* userPhoneName = [[UIDevice currentDevice] name];NSLog(@"手机别名: %@", userPhoneName);NSString* deviceName = [[UIDevice currentDevice] systemName];NSLog(@"设备名称: %@",deviceName );NSString* phoneVersion = [[UIDevice currentDevice] systemVersion];NSLog(@"手机系统版本: %@", phoneVersion);NSString* phoneModel = [[UIDevice currentDevice] model];NSLog(@"手机型号: %@",phoneModel );NSString* localPhoneModel = [[UIDevice currentDevice] localizedModel];NSLog(@"国际化区域名称: %@",localPhoneModel );NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];NSString *appCurName = [infoDictionary objectForKey:@"CFBundleDisplayName"];NSLog(@"当前应用名称:%@",appCurName);NSString *appCurVersion = [infoDictionary objectForKey:@"CFBundleShortVersionString"];NSLog(@"当前应用软件版本:%@",appCurVersion);NSString *appCurVersionNum = [infoDictionary objectForKey:@"CFBundleVersion"];NSLog(@"当前应用版本号码:%@",appCurVersionNum);//app应用相关信息的获取NSDictionary *dicInfo = [[NSBundle mainBundle] infoDictionary];// CFShow(dicInfo);NSString *strAppName = [dicInfo objectForKey:@"CFBundleDisplayName"];NSLog(@"App应用名称:%@", strAppName); // 当前应用名称NSString *strAppVersion = [dicInfo objectForKey:@"CFBundleShortVersionString"];NSLog(@"App应用版本:%@", strAppVersion); // 当前应用软件版本 比如:1.0.1NSString *strAppBuild = [dicInfo objectForKey:@"CFBundleVersion"];NSLog(@"App应用Build版本:%@", strAppBuild); // 当前应用版本号码 int类型//Getting the User’s LanguageNSArray *languageArray = [NSLocale preferredLanguages];NSString *language = [languageArray objectAtIndex:0];NSLog(@"语言:%@", language);//enNSLocale *locale = [NSLocale currentLocale];NSString *country = [locale localeIdentifier];NSLog(@"国家:%@", country); //en_US
这篇关于获取手机设备信息 总汇的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!