iOS 获取设备版本、语言等信息

UIDevice *currentDevice = [UIDevice currentDevice];

NSString *model = [currentDevice model];

NSString *systemVersion = [currentDevice systemVersion];

NSArray *languageArray = [NSLocale preferredLanguages];

NSString *language = [languageArray objectAtIndex:0];

NSLocale *locale = [NSLocale currentLocale];

NSString *country = [locale localeIdentifier];

NSString *appVersion = [[NSBundle mainBundle]

objectForInfoDictionaryKey:(NSString *)kCFBundleVersionKey];

NSString *deviceSpecs =

[NSString stringWithFormat:@"%@ - %@ - %@ - %@ - %@",

model, systemVersion, language, country, appVersion];

NSLog(@"Device Specs --> %@",deviceSpecs);

你可能感兴趣的:(iOS 获取设备版本、语言等信息)