2014 Last day, I wish you a happy new year. 20,151 cut smoothly!
Reference: http://www.cnblogs.com/shadox/archive/2013/02/05/2893017.html
Import #import "Sys/utsname.h"
struct Utsname systemInfo;
Uname (&systeminfo);
NSString *devicestring = [NSString stringwithcstring:systeminfo. Machine Encoding:nsutf 8StringEncoding];
if ([Platform isequaltostring:@ "iphone1,1"]) return @ "IPhone 2G (A1203)";
if ([Platform isequaltostring:@ "iphone1,2"]) return @ "IPhone 3G (a1241/a1324)";
if ([Platform isequaltostring:@ "iphone2,1"]) return @ "IPhone 3GS (a1303/a1325)";
if ([Platform isequaltostring:@ "iphone3,1"]) return @ "IPhone 4 (A1332)";
if ([Platform isequaltostring:@ "iphone3,2"]) return @ "IPhone 4 (A1332)";
if ([Platform isequaltostring:@ "iphone3,3"]) return @ "IPhone 4 (A1349)";
if ([Platform isequaltostring:@ "iphone4,1"]) return @ "IPhone 4S (a1387/a1431)";
if ([Platform isequaltostring:@ "iphone5,1"]) return @ "IPhone 5 (A1428)";
if ([Platform isequaltostring:@ "iphone5,2"]) return @ "IPhone 5 (a1429/a1442)";
if ([Platform isequaltostring:@ "iphone5,3"]) return @ "IPhone 5c (a1456/a1532)";
if ([Platform isequaltostring:@ "iphone5,4"]) return @ "IPhone 5c (a1507/a1516/a1526/a1529)";
if ([Platform isequaltostring:@ "iphone6,1"]) return @ "IPhone 5s (a1453/a1533)";
if ([Platform isequaltostring:@ "iphone6,2"]) return @ "IPhone 5s (a1457/a1518/a1528/a1530)";
if ([Platform isequaltostring:@ "iphone7,1"]) return @ "IPhone 6 Plus (a1522/a1524)";
if ([Platform isequaltostring:@ "iphone7,2"]) return @ "IPhone 6 (a1549/a1586)";
if ([Platform isequaltostring:@ "ipod1,1"]) return @ "IPod Touch 1G (A1213)";
if ([Platform isequaltostring:@ "ipod2,1"]) return @ "IPod Touch 2G (A1288)";
if ([Platform isequaltostring:@ "ipod3,1"]) return @ "IPod Touch 3G (A1318)";
if ([Platform isequaltostring:@ "ipod4,1"]) return @ "IPod Touch 4G (A1367)";
if ([Platform isequaltostring:@ "ipod5,1"]) return @ "IPod Touch 5G (a1421/a1509)";
if ([Platform isequaltostring:@ "ipad1,1"]) return @ "IPad 1G (a1219/a1337)";
if ([Platform isequaltostring:@ "ipad2,1"]) return @ "IPad 2 (A1395)";
if ([Platform isequaltostring:@ "ipad2,2"]) return @ "IPad 2 (A1396)";
if ([Platform isequaltostring:@ "ipad2,3"]) return @ "IPad 2 (A1397)";
if ([Platform isequaltostring:@ "ipad2,4"]) return @ "IPad 2 (a1395+new Chip)";
if ([Platform isequaltostring:@ "ipad2,5"]) return @ "IPad Mini 1G (A1432)";
if ([Platform isequaltostring:@ "ipad2,6"]) return @ "IPad Mini 1G (A1454)";
if ([Platform isequaltostring:@ "ipad2,7"]) return @ "IPad Mini 1G (A1455)";
if ([Platform isequaltostring:@ "ipad3,1"]) return @ "IPad 3 (A1416)";
if ([Platform isequaltostring:@ "ipad3,2"]) return @ "IPad 3 (A1403)";
if ([Platform isequaltostring:@ "ipad3,3"]) return @ "IPad 3 (A1430)";
if ([Platform isequaltostring:@ "ipad3,4"]) return @ "IPad 4 (A1458)";
if ([Platform isequaltostring:@ "ipad3,5"]) return @ "IPad 4 (A1459)";
if ([Platform isequaltostring:@ "ipad3,6"]) return @ "IPad 4 (A1460)";
if ([Platform isequaltostring:@ "ipad4,1"]) return @ "IPad Air (A1474)";
if ([Platform isequaltostring:@ "ipad4,2"]) return @ "IPad Air (A1475)";
if ([Platform isequaltostring:@ "ipad4,3"]) return @ "IPad Air (A1476)";
if ([Platform isequaltostring:@ "ipad4,4"]) return @ "IPad Mini 2G (A1489)";
if ([Platform isequaltostring:@ "ipad4,5"]) return @ "IPad Mini 2G (A1490)";
if ([Platform isequaltostring:@ "ipad4,6"]) return @ "IPad Mini 2G (A1491)";
if ([Platform isequaltostring:@ "i386"]) return @ "IPhone Simulator";
if ([Platform isequaltostring:@ "x86_64"]) return @ "IPhone Simulator";
These are all iOS device information.
IOS Get device information