+ ( nsstring *) devicestring{ // need #import "sys/utsname.h " struct utsname systeminfo; uname (& SystemInfo); nsstring *devicestring = [ nsstring stringwithcstring:systeminfo.machine encoding: nsutf8stringencoding ]; if ([devicestring isequaltostring:@ "iphone1,1"  ]) return @ "IPHONE 1G" ; if ([devicestring isequaltostring:@ "iphone1,2"  ]) return @ "iphone 3g" ; if ([devicestring isequaltostring:@ "iphone2,1"  ]) return @ "IPHONE 3GS" ; if ([DeviceString isequaltostring:@ "iphone3,1"  ]) return @ "IPhone 4 " ; if ([devicestring isequaltostring:@ " iphone4,1 " ]) return @ "iphone 4s" ; if ([devicestring isequaltostring:@ "iphone5,2"  ]) return @ "Iphone 5" ; if ([devicestring isequaltostring:@ "iphone3,2"  ]) return @ "Verizon iphone 4" ; if ([devicestring isequaltostring:@ "ipod1,1"  ]) return @ "IPOD TOUCH 1G" ; if ([devicestring isequaltostring:@ "ipod2,1"  ]) return @ " ipod touch 2g " ; if ([devicestring isequaltostring:@ "ipod3,1"  ]) return @ "ipod touch 3g" ; if ([devicestring isequaltostring:@ "ipod4,1"  ]) return @ "IPOD TOUCH 4G" ; if ([devicestring isequaltostring:@ "ipad1,1"  ]) return @ "IPad" ; if ([devicestring isequaltostring:@ "ipad2,1"  ]) return @ "IPad 2 (WiFi) " ; if ([devicestring isequaltostring:@ ") ipad2,2 " ]) return @ " ipad 2 (GSM) " ; if ([devicestring isequaltostring:@ "ipad2,3"  ]) return @ "ipad 2 (CDMA)" ; if ([devicestring isequaltostring:@ "i386"  ]) return @ "Simulator" ; if ([devicestring isequaltostring:@ "x86_64" ]) return @ "Simulator" ; NSLog (@ "note: unknown device type: %@" , devicestring); return devicestring;}
Get the code for your iOS device model