Determine the iOS device model

Source: Internet
Author: User

Tag:model   iphone    model    iphone6s    iphone6splus   

Nsstring* clientmodel () {    nsstring *model = [[uidevice  currentdevice] model];    if  ([model isequaltostring:@ "iPhone1,1"])      return @ "iphone 1g";    if  ([model isEqualToString:@ "iphone1,2"])     return @ "iphone 3g";    if  ([model  isequaltostring:@ "iphone2,1"])     return @ "IPHONE 3GS";     if  ([model isequaltostring:@ "iphone3,1"])     return @ "iphone 4";     if  ([model isequaltostring:@ "iphone3,3"])     return  @ "Verizon iphone 4";    if  ([model isequaltostring:@ "iPhone4,1"] )     return @ "iphone 4s";    if  ([model  isequaltostring:@ "iphone5,1"])     return @ "iphone 5  (GSM)";    if  ([model  isequaltostring:@ "iphone5,2"])     return @ "iphone 5  (GSM+CDMA)";     if  ([model isequaltostring:@ "iphone5,3"])     return @ " iphone 5c  (GSM) ";    if  ([model isequaltostring:@" iPhone5,4 "])      return @ "iphone 5c  (GSM+CDMA)";    if  ([model  isequaltostring:@ "iphone6,1"])     return @ "iphone 5s  (GSM)";     if  ([model isequaltostring:@ "iphone6,2"])     return @ "IPhone  5s  (GSM+CDMA) ";    if  ([model isequaltostring:@" iphone7,1 "])      return @ "Iphone 6 plus";    if  ([model  isequaltostring:@ "iphone7,2"])     return @ "Iphone 6";    if  ([model isequaltostring:@ "iPhone8,1"])     return @ "Iphone 6s plus";    if  ([model  isequaltostring:@ "iphone8,2"])     return @ "iphone 6s";     if   ([model isequaltostring:@ "ipod1,1"])       return @ "iPod  touch 1g ";    if  ([model isequaltostring:@" ipod2,1 "])        return @ "ipod touch 2g";    if  ([model  isequaltostring:@ "ipod3,1"])       return @ "ipod touch 3g";     if  ([model isequaltostring:@ "ipod4,1"])       return  @ "ipod touch 4g";    if  ([model isequaltostring:@ "iPod5,1"])       return @ "ipod touch 5g";    if  ([model isequaltostring:@ "IPad1 , 1 "])       return @" IPad ";    if  ([model  isequaltostring:@ "ipad2,1"])       return @ "ipad 2  (WiFi)";     if  ([model isequaltostring:@ "ipad2,2"])       return  @ "ipad 2  (GSM)";    if  ([model isequaltostring:@ "iPad2,3"])       return @ "ipad 2  (CDMA)";    if  ([ model isequaltostring:@ "ipad2,4"])       return @ "iPad 2  ( WiFi) ";    if  ([model isequaltostring:@" ipad2,5 "])        return @ "ipad mini  (WiFi)";    if  ([model isequaltostring:@ "ipad2,6"])   &Nbsp;   return @ "ipad mini  (GSM)";    if  ([model  isequaltostring:@ "ipad2,7"])       return @ "ipad mini  (GSM+CDMA)";     if  ([model isequaltostring:@ "ipad3,1"])        return @ "ipad 3  (WiFi)";    if  ([model isequaltostring:@ "iPad3,2" ])       return @ "ipad 3  (GSM+CDMA)";     if   ([model isequaltostring:@ "ipad3,3"])       return @ "iPad 3   (GSM) ";    if  ([model isequaltostring:@" ipad3,4 "])        return @ "ipad 4  (WiFi)";    if  ([model  isequaltostring:@ "ipad3,5"])       return @ "ipad 4  (GSM)";     if  ([model isequaltostring:@ "ipad3,6"])       return @ "iPad 4  (GSM+CDMA) ";    if  ([model isequaltostring:@" ipad4,1 "])        return @ "ipad air  (WiFi)";    if  ([model isequaltostring:@] ipad4,2 "])       return @" ipad air  (Cellular) ";     if  ([model isequaltostring:@ "ipad4,4"])       return @ "IPad  Mini 2G  (WiFi) ";    if  ([model isequaltostring:@" ipad4,5 "])       return @ "ipad mini 2g  (Cellular)";     if  ([model isequaltostring:@ "ipad5,1"])       return @ "IPad  Mini 4  (WiFi) ";    if  ([model isequaltostring:@" ipad5,2 "])        return @ "ipad mini 4  (Cellular)";    if  ([model  isequaltostring:@ "ipad6,8"])       return @ "Ipad pro";     if  ([model isequaltostring:@ "i386"])           return @ "Simulator";    if  ([model isequaltostring:@ "x86_64"])         return @ "Simulator";     return model;}


This article is from the "Code Road" blog, be sure to keep this source http://roybaby.blog.51cto.com/1508945/1695060

Determine the iOS device model

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.