Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 如何在objective c中获取操作系统名称_Ios_Objective C - Fatal编程技术网

Ios 如何在objective c中获取操作系统名称

Ios 如何在objective c中获取操作系统名称,ios,objective-c,Ios,Objective C,我想在objective-c中检测当前设备操作系统名称(如操作系统:iOS) 你能帮我解决我的问题吗 提前谢谢 NSString *strName = [[UIDevice currentDevice] name]; NSLog(@"%@", strName);//e.g. "My iPhone" NSString *strSysName = [[UIDevice currentDevice] systemName]; NSLog(@"%@", strSysName);/

我想在objective-c中检测当前设备操作系统名称(如操作系统:iOS)

你能帮我解决我的问题吗

提前谢谢

 NSString *strName = [[UIDevice currentDevice] name];  
 NSLog(@"%@", strName);//e.g. "My iPhone"   

 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