Identify and determine iOS device information

Source: Internet
Author: User

Either try this library:http://github.com/erica/uidevice-extension/(by Erica Sadun).

(Sample Code):

[[UIDevice currentDevice] platformType]   // ex: UIDevice4GiPhone[[UIDevice currentDevice] platformString] // ex: @"iPhone 4G"

OR You can use the This method:

You can get the device model number using uname from Sys/utsname.h. For example:




[[Uidevice Currentdevice] Platformtype]//Ex:uidevice4giphone[[Uidevice Currentdevice] platformstring]//ex: @ "IPhone 4G"OR You can use ThisMethod:#import<sys/utsname.h>//import it in your header or implementation file.NSString*devicename () {structUtsname SystemInfo; Uname (&systemInfo); return[NSString stringWithCString:systemInfo.machine encoding:nsutf8stringencoding];} The result should be:@"i386"On +-bit Simulator@"x86_64"On --bit Simulator@"ipod1,1"On iPod Touch@"ipod2,1"On iPod Touch Second Generation@"ipod3,1"On iPod Touch third Generation@"ipod4,1"On iPod Touch fourth Generation@"ipod7,1"On iPod Touch 6th Generation@"iphone1,1"On IPhone@"iphone1,2"On iPhone 3G@"iphone2,1"On iPhone 3GS@"ipad1,1"On IPad@"ipad2,1"On IPad2@"ipad3,1"On 3rd Generation iPad@"iphone3,1"On IPhone4(GSM)@"iphone3,3"On IPhone4(cdma/verizon/Sprint)@"iphone4,1"On iPhone 4S@"iphone5,1"On IPhone5(Model A1428, at&t/Canada)@"iphone5,2"On IPhone5(Model A1429, everythingElse)@"ipad3,4"On 4th Generation IPad@"ipad2,5"On iPad Mini@"iphone5,3"On IPhone 5c (model A1456, A1532 |GSM)@"iphone5,4"On IPhone 5c (model A1507, A1516, A1526 (China), A1529 |Global)@"iphone6,1"On IPhone 5s (model A1433, A1533 |GSM)@"iphone6,2"On IPhone 5s (model A1457, A1518, A1528 (China), A1530 |Global)@"ipad4,1"On 5th Generation ipad (ipad Air)-Wifi@"ipad4,2"On 5th Generation ipad (ipad Air)-Cellular@"ipad4,4"On 2nd Generation IPad Mini-Wifi@"ipad4,5"On 2nd Generation IPad Mini-Cellular@"ipad4,7"On 3rd Generation IPad Mini-Wifi (model A1599)@"iphone7,1"On IPhone6Plus@"iphone7,2"On IPhone6@"iphone8,1"On iPhone 6S@"iphone8,2"On IPhone 6S Plus

From

Http://stackoverflow.com/questions/11197509/ios-how-to-get-device-make-and-model

Identify and determine iOS device information

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.