获取设备型号

#include 
+ (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

你可能感兴趣的:(获取设备型号)