• About Us
  • Blog
  • Basket
  • Account
  • Sign In


Detect Apple iPhone Model Numbers and User-Agents

Published on Monday, May 15, 2017

Detect Apple iPhone Model Numbers and User-Agents

51Degrees property: HardwareModelVariants

For the latest instructions on how to detect Apple iPhones and iPads please refer to this blog

We recently reviewed the model numbers within the Android User-Agent strings for the Samsung Galaxy S8 and S8+. This week we look closer at User-Agent strings for the Apple iPhone 7.

Please note that this article is not applicable for Native apps and TAC codes as they operate at a precise model level. 51Degrees already support Native Apps as part of our Enterprise package.

In many cases Apple obfuscates device information

As evidenced below the User-Agent identifies that the device is an iPhone but gives no model information. Based on the User-Agent alone it would be impossible to tell whether the requesting device was an iPhone 5, iPhone 7 Plus or any other. In these instances there are however some additional techniques that can be employed to help detection, for more information refer to our article on Device Detection for Apple iPhones and iPads.

Apple iPhone 7 User-Agent example that gives no identifier:

Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/10.0 Mobile/14E304 Safari/602.1

Apple iPhone Evolution

Contact us or get started with a free trial

Test My Device Start a Free TrialContact Us

In select cases, most commonly when requested through a web application such as Facebook, Snapchat or Instagram, we are treated with a device identifier. In the example User-Agent below, towards the end of the string you can see 'iPhone9,3'. Unfortunately that's not the end of the chase, but it does give a much clearer picture as to what device is being used.

Apple iPhone 7 User-Agent example that gives an identifier:

Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Mobile/14E304 Instagram 10.10.0 (iPhone9,3; iOS 10_3_1; en_US; en-US; scale=2.00; gamut=wide; 750x1334)

The inclusion of 'iPhone9,3' tells us the device is the Apple iPhone 7. The identifier of 'iPhone9,1' also corresponds to the iPhone 7, the differences between these two is related to the networks. With the iPhone 7 there are four sub model numbers; A1660, A1778, A1779 and A1780, each representing different regions or carriers. None of which are shown in the User-Agent. Considering the future we expect to see a similar pattern for the iPhone 8 due out later this year.

So where does that leave us?

We have four model numbers for the iPhone 7 which cannot be distinguished between via the devices web request, choosing a single one of these four model numbers to represent the iPhone 7 would on average only be correct 25% of the time, even if weight was given through popularity this wouldn't come close to the accuracy we pride ourselves on.

The answer is a property entitled 'HardwareModelVariants'

This property will return two or more associated model numbers of a device where a single unique identifier is unavailable. Where a single identifier for a device is available then this property will instead return N/A.

Property: HardwareModelVariants

Description: Indicates all model numbers used by the hardware vendor to identify the device. This property compliments 'HardwareModel', e.g. Hardware Model Variants A1660 and A1778 correlate to the iPhone 7 Hardware Model.

Again, please note that this article is not applicable for Native apps and TAC codes as they operate at a precise model level. 51Degrees already support Native Apps as part of our Enterprise package.

All code and methods shared in our blogs are only relevant as long as Apple do not block the information that can be accessed.

Try 51Degrees today to add detailed device information to your website


Get Started

For the latest breaking device and data news please follow the 51Degrees Data Team on twitter @51DegreesData or subscribe to our RSS feed.

Comments (0)


Other posts by Edward
Contact author



.NET 2013 2014 4G 51Degrees 5G A.C.Roma A7 ABI Acer Adtech Affiliate Marketing Afilias Alcatel Amazon AMP Analysis Analytics Android Android 5.0 Lollipop Android Kitkat Android Lollipop Android Media Stick Apache API Apple Apple TV Archos Asha Asian Market ASP.NET Asus Australia Big Data Black Friday Blackberry Blink Browser C C# Case Study CeBIT CES Chrome Cloud CMS combinations Comparison Competition CoolPad COTW Cron CSS3 Data Data Blog Data File Data Model Daydream Denver Design Desire Eye Desktop Detection Developers Device Device Data Device Detection Device Intelligence Device Popularity Device property Device Types Device Use DeviceAtlas Display dmexco DoCoMo Doogee DotNetNuke Download Drupal Email EReader E-Reader Ericsson Evaluation Event Examples EXPLAY Rio Facebook feature Firefox Firefox OS Fly Foundation Framework France Galaxy S3 Galaxy S5 Galaxy Tab A Galaxy Tab A 8.0 Galaxy Tab A 9.7 Germany git repositories Global Google Google Daydream GSMA HAProxy Hardware Hisense HTC HTC ONE MAX HTC OS HTML5 HTTP HTTP Headers Huawei HUAWEI. UPDATE HUDL Huwaei IBC Icemobile Prime 4.0 IE IFA IIS Image Optimiser Image Optimizer India Infographic Ingeniux Internet usage iOS iOS 7 iOS 8 ipad iPhone iPhone 6 IsEmailBrowser IsWebApp Italy Japan Java Javascript Jolla Kentico Keynote Kindle Kindle Fire Kindle Fire HD Leagoo Lenovo LG Location Log File Analysis LTE Lumia m.dot macOS Map Memory Meta Data Mi 4S Micromax Microsoft Miia Style Mobile Mobile Analysis Mobile Analytics Mobile Devices Mobile Marketing Mixer Module Motorola MVC4 MWC MWC 2017 MWC16 MyPhone Native Native Apps NET New Release News News Letter Nexus Nexus 6 Nexus 9 NFC NGINX Nokia Nokia 3310 Non-Mobile NVIDIA Omate On7 OnePlus 5 Opera Opera Mini Operating System Optimisation OS OSX 10.10 OTA Panasonic Patent PC Pebble Performance phablet phone PHP Poland Presentation Press Release Price Band PRIV programmatic PS4 Publishers Python QMobile QR Codes Redirection Research Reseller Responsive Images Responsive web design RESS Review reviews RIM Ringmark RTB RWD Safari Samsung Scala ScientiaMobile Screen Screen resolution Screen Size SEO Server Server-side optimisation Set Box Set Top Box Sharepoint Shark 1 SHIFT phones Sitecore Sitecore version 9 SLUSH Smart TV Smartphone Smartphones Smartwatches Snapdragon Sony Sony Xperia Spain Swedish Beers Symbian Tablet Tablets Tesco Testing Tips Top 5 TOTW Tutorial TV UDS UK Umbraco Update updates US User Agent UserAgent User-Agent Vendors Version 3 Video VoLTE VR Wearable Web Web Apps Web content management WebKit WebMatrix White Paper Widgets Widnows WiFi Wiko Wileyfox Windows Windows Phone WURFL Xbox XBox One Xiaomi Xperia Xperia z Yosemite Z10 ZenFon 2 ZOPO ZTE