文件名称:IOS设备类型获取PLIST
文件大小:2KB
文件格式:PLIST
更新时间:2017-01-20 09:48:16
IOS设备类型
IOS设备类型获取PLIST struct utsname systemInfo; uname(&systemInfo); NSString *iOSDeviceModelsPath = [[NSBundle mainBundle] pathForResource:@"iOSDeviceModelMapping" ofType:@"plist"]; NSDictionary *iOSDevices = [NSDictionary dictionaryWithContentsOfFile:iOSDeviceModelsPath]; NSString* deviceModel = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding]; return [iOSDevices valueForKey:deviceModel];