获取设备型号
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];
}
屏幕快照 2019-07-11 下午2.58.37.png