我希望通过代码获取设备模型(Settings->General->About->Model)
。我用过:
NSString* model=[[UIDevice currentDevice] model];
以上代码返回“iPhone”。但我需要获得(Settings->General->About->Model)
中显示的设备模型值。例如在我的iPhone中它是“MD128HN / A.请参阅附件快照。
答案 0 :(得分:0)
NSString *platform = [UIDevice currentDevice].model;
NSLog(@"[UIDevice currentDevice].model: %@",platform);
NSLog(@"[UIDevice currentDevice].description: %@",[UIDevice currentDevice].description);
NSLog(@"[UIDevice currentDevice].localizedModel: %@",[UIDevice currentDevice].localizedModel);
NSLog(@"[UIDevice currentDevice].name: %@",[UIDevice currentDevice].name);
NSLog(@"[UIDevice currentDevice].systemVersion: %@",[UIDevice currentDevice].systemVersion);
NSLog(@"[UIDevice currentDevice].systemName: %@",[UIDevice currentDevice].systemName);