获取设备型号
2019-07-11 本文已影响0人
精神薇
#include <sys/utsname.h>
+ (NSString *)getDeviceModel
{
NSString *platform = nil;
struct utsname systemInfo;
uname(&systemInfo);
platform = [NSString stringWithCString:systemInfo.machine
encoding:NSUTF8StringEncoding];
return [NSString stringWithFormat:@"%@",platform];
}
