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

Blog

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)
Edward
Edward>

Edward

Other posts by Edward
Contact author

Name:
Email:
Subject:
Message:
x

Tags

.NET 4G 51Degrees 5G Acer Adform Adtech Advertising Afilias Alcatel Amazon AMP Analysis Analytics Android Apache API Apple Asian Market ASP.NET Asus Blackberry Browser C C# Centro Chrome Cloud CMS CPU CSS3 Data Data Blog Data File Daydream Design Detection Developers Device Device Data Device Detection Device Intelligence Device Models Device property DeviceAtlas Disney dmexco DotNetNuke Download ebay Ericsson Event Facebook Firefox Foundation Framework Galaxy git repositories Google Google Analytics Google Daydream GPU GSMA Guess HAProxy Hash Trie HTC HTML5 HTTP HTTP Headers Huawei Infinix Ingeniux Internet usage iOS iOS 13 ipad iPadOS iPhone iPhone 11 Java Javascript Kentico LG Liferay LTE m.dot Memory Memory leak Meta Data Microsoft Mobile Mobile Analysis Mobile Analytics Mobile Devices Mobile Marketing Mixer Motorola Mozilla MWC MWC 2017 MWC16 Native Apps NET New Release News Nexus NFC NGINX Nokia OnePlus 5 Opera Operating System Oppo Optimisation OS Patent Performance PHP Press Release Price Band programmatic Publishers Python Redirection Research Responsive Images Responsive web design RESS Review RTB RWD Safari Samsung Scala ScientiaMobile SEO Server Server-side optimisation Seznam.cz Sitecore Smart TV Smartphone Smartwatches Sony Swedish Beers Tablet Tencent Testing Tips Tutorial Umbraco Update User Agent User-Agent Valgrind Varnish Varnish Cache Video Vodafone VoLTE Web Web Apps Web content management Webtrekk White Paper Widgets WiFi Windows WURFL Xiaomi Xperia ZTE