ios获取手机序列号_iOS获取手机型号、iOS获取当前app的名称和版本号

news/2024/11/25 17:18:14/

//需要#import

+ (NSString*)deviceModelName

{structutsname systemInfo;

uname(&systemInfo);

NSString*deviceModel =[NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding];if ([deviceModel isEqualToString:@"iPhone3,1"]) return @"iPhone 4";if ([deviceModel isEqualToString:@"iPhone3,2"]) return @"iPhone 4";if ([deviceModel isEqualToString:@"iPhone3,3"]) return @"iPhone 4";if ([deviceModel isEqualToString:@"iPhone4,1"]) return @"iPhone 4S";if ([deviceModel isEqualToString:@"iPhone5,1"]) return @"iPhone 5";if ([deviceModel isEqualToString:@"iPhone5,2"]) return @"iPhone 5 (GSM+CDMA)";if ([deviceModel isEqualToString:@"iPhone5,3"]) return @"iPhone 5c (GSM)";if ([deviceModel isEqualToString:@"iPhone5,4"]) return @"iPhone 5c (GSM+CDMA)";if ([deviceModel isEqualToString:@"iPhone6,1"]) return @"iPhone 5s (GSM)";if ([deviceModel isEqualToString:@"iPhone6,2"]) return @"iPhone 5s (GSM+CDMA)";if ([deviceModel isEqualToString:@"iPhone7,1"]) return @"iPhone 6 Plus";if ([deviceModel isEqualToString:@"iPhone7,2"]) return @"iPhone 6";if ([deviceModel isEqualToString:@"iPhone8,1"]) return @"iPhone 6s";if ([deviceModel isEqualToString:@"iPhone8,2"]) return @"iPhone 6s Plus";if ([deviceModel isEqualToString:@"iPhone8,4"]) return @"iPhone SE";//日行两款手机型号均为日本独占,可能使用索尼FeliCa支付方案而不是苹果支付

if ([deviceModel isEqualToString:@"iPhone9,1"]) return @"国行、日版、港行iPhone 7";if ([deviceModel isEqualToString:@"iPhone9,2"]) return @"港行、国行iPhone 7 Plus";if ([deviceModel isEqualToString:@"iPhone9,3"]) return @"美版、台版iPhone 7";if ([deviceModel isEqualToString:@"iPhone9,4"]) return @"美版、台版iPhone 7 Plus";if ([deviceModel isEqualToString:@"iPhone10,1"]) return @"iPhone_8";if ([deviceModel isEqualToString:@"iPhone10,4"]) return @"iPhone_8";if ([deviceModel isEqualToString:@"iPhone10,2"]) return @"iPhone_8_Plus";if ([deviceModel isEqualToString:@"iPhone10,5"]) return @"iPhone_8_Plus";if ([deviceModel isEqualToString:@"iPhone10,3"]) return @"iPhone_X";if ([deviceModel isEqualToString:@"iPhone10,6"]) return @"iPhone_X";if ([deviceModel isEqualToString:@"iPod1,1"]) return @"iPod Touch 1G";if ([deviceModel isEqualToString:@"iPod2,1"]) return @"iPod Touch 2G";if ([deviceModel isEqualToString:@"iPod3,1"]) return @"iPod Touch 3G";if ([deviceModel isEqualToString:@"iPod4,1"]) return @"iPod Touch 4G";if ([deviceModel isEqualToString:@"iPod5,1"]) return @"iPod Touch (5 Gen)";if ([deviceModel isEqualToString:@"iPad1,1"]) return @"iPad";if ([deviceModel isEqualToString:@"iPad1,2"]) return @"iPad 3G";if ([deviceModel isEqualToString:@"iPad2,1"]) return @"iPad 2 (WiFi)";if ([deviceModel isEqualToString:@"iPad2,2"]) return @"iPad 2";if ([deviceModel isEqualToString:@"iPad2,3"]) return @"iPad 2 (CDMA)";if ([deviceModel isEqualToString:@"iPad2,4"]) return @"iPad 2";if ([deviceModel isEqualToString:@"iPad2,5"]) return @"iPad Mini (WiFi)";if ([deviceModel isEqualToString:@"iPad2,6"]) return @"iPad Mini";if ([deviceModel isEqualToString:@"iPad2,7"]) return @"iPad Mini (GSM+CDMA)";if ([deviceModel isEqualToString:@"iPad3,1"]) return @"iPad 3 (WiFi)";if ([deviceModel isEqualToString:@"iPad3,2"]) return @"iPad 3 (GSM+CDMA)";if ([deviceModel isEqualToString:@"iPad3,3"]) return @"iPad 3";if ([deviceModel isEqualToString:@"iPad3,4"]) return @"iPad 4 (WiFi)";if ([deviceModel isEqualToString:@"iPad3,5"]) return @"iPad 4";if ([deviceModel isEqualToString:@"iPad3,6"]) return @"iPad 4 (GSM+CDMA)";if ([deviceModel isEqualToString:@"iPad4,1"]) return @"iPad Air (WiFi)";if ([deviceModel isEqualToString:@"iPad4,2"]) return @"iPad Air (Cellular)";if ([deviceModel isEqualToString:@"iPad4,4"]) return @"iPad Mini 2 (WiFi)";if ([deviceModel isEqualToString:@"iPad4,5"]) return @"iPad Mini 2 (Cellular)";if ([deviceModel isEqualToString:@"iPad4,6"]) return @"iPad Mini 2";if ([deviceModel isEqualToString:@"iPad4,7"]) return @"iPad Mini 3";if ([deviceModel isEqualToString:@"iPad4,8"]) return @"iPad Mini 3";if ([deviceModel isEqualToString:@"iPad4,9"]) return @"iPad Mini 3";if ([deviceModel isEqualToString:@"iPad5,1"]) return @"iPad Mini 4 (WiFi)";if ([deviceModel isEqualToString:@"iPad5,2"]) return @"iPad Mini 4 (LTE)";if ([deviceModel isEqualToString:@"iPad5,3"]) return @"iPad Air 2";if ([deviceModel isEqualToString:@"iPad5,4"]) return @"iPad Air 2";if ([deviceModel isEqualToString:@"iPad6,3"]) return @"iPad Pro 9.7";if ([deviceModel isEqualToString:@"iPad6,4"]) return @"iPad Pro 9.7";if ([deviceModel isEqualToString:@"iPad6,7"]) return @"iPad Pro 12.9";if ([deviceModel isEqualToString:@"iPad6,8"]) return @"iPad Pro 12.9";if ([deviceModel isEqualToString:@"AppleTV2,1"]) return @"Apple TV 2";if ([deviceModel isEqualToString:@"AppleTV3,1"]) return @"Apple TV 3";if ([deviceModel isEqualToString:@"AppleTV3,2"]) return @"Apple TV 3";if ([deviceModel isEqualToString:@"AppleTV5,3"]) return @"Apple TV 4";if ([deviceModel isEqualToString:@"i386"]) return @"Simulator";if ([deviceModel isEqualToString:@"x86_64"]) return @"Simulator";returndeviceModel;

}


http://www.ppmy.cn/news/692803.html

相关文章

如何动手用js自己写一个分页?

实现效果 实现代码 function generateTableHead() {const tableHead document.getElementById(table-head);tableHead.innerHTML ;// 添加复选框列的表头const checkboxHead document.createElement(th);const checkbox document.createElement(input);checkbox.type che…

基于单片机智能洗衣机设计与实现

功能介绍 以51单片机作为主控系统;利用STC89C52单片机进行数据处理; 通过2路继电器分别控制洗衣机进水、出水相关逻辑运算;采用L298去掉直流电机实现滚筒正反转;通过单片机进行处理数据,把采集到的数据通过LCD液晶显示…

catia打开stp文件不是实体_Catia与Stp格式转换时居然有这么多技巧,你造吗?

STP作为一种常用的3D通用格式,经常会被用于数据的交换。CATIA软件提供了将产品转为STP格式的方法。 1)CATIA产品转STP格式的技巧:保留产品颜色 很多人在将产品转换成STP格式时,常常苦恼于产品颜色的丢失。于是,大家一定会问CATIA有…

stp文件转stl

什么是一 .stp 文件? STP 文件是用于在 CAD 和 CAM 应用程序之间交换产品数据的 3D CAD 文件。它包含有关 3D 对象的信息,并以类似于STEP文件格式的方式保存。STP 文件根据STEP应用程序协议 ISO 10303-2xx 促进应用程序之间的数据交换。该 ISO 定义了 EX…

Creo文件怎么保存为HTML文件,将Creo装配体的每个部件保存成单独的STP格式 | 坐倚北风...

我们在Creo中将装配体保存成STP格式时,默认是将所有的部件保存到一个STP文件中。如果我们希望将所有的部件保存成单独的STP文件,可进行如下设置。 将选项step_export_format的值设置为ap214_is,此时在导出STP对话框中会出现文件结构选项。 选…

​stp文件转ply

什么是一 .stp 文件? STP 文件是用于在 CAD 和 CAM 应用程序之间交换产品数据的 3D CAD 文件。它包含有关 3D 对象的信息,并以类似于STEP文件格式的方式保存。STP 文件根据STEP应用程序协议 ISO 10303-2xx 促进应用程序之间的数据交换。该 ISO 定…

​stp文件转wrl

什么是一 .stp 文件? STP 文件是用于在 CAD 和 CAM 应用程序之间交换产品数据的 3D CAD 文件。它包含有关 3D 对象的信息,并以类似于STEP文件格式的方式保存。STP 文件根据STEP应用程序协议 ISO 10303-2xx 促进应用程序之间的数据交换。该 ISO 定…

catia批量转stp文件格式_CATIA,UG,PROE等等格式批量转成stp,step,igs,iges

CATIA,UG,PROE等等格式批量转成stp,step,igs,iges 开始之前,问大家几个问题: 1、如果你电脑里只安装了CATIA,但是客户却给你发了一个UG的源文件,怎么办? 2、客户用的是PROE,但你用的…