How To Detect iPhone 8 And iPhone X With DeviceAtlas

Both released in late 2017, the iPhone 8 and iPhone X have, unsurprisingly, cemented themselves as the flagship models for Apple (despite the latter not quite reaching the sales figures anticipated).

With each iteration of the iPhone, there are a few models to choose from, each one featuring different specifications. In total, including the Plus, there are 10 variations of iPhone 8, and already 5 in the X range.

This makes accurately detecting the exact specifications of a device a potential headache. The iPhone 8 Plus, for example, features a 1080 x 1920 screen, with the base iPhone 8 checking in at 750 x 1334.

The difference for the end user, for even the most basic of variables such as image clarity, can harm what could otherwise be a perfect user experience. If it affects a visitor/user, a potential customer, then it'll certainly affect your ROI, too. By identifying the exact model of phone, you can avoid these potential dips in user experience.

However, with Apple devices the User-Agent string only indicates the hardware type, not the model. By parsing UAs alone, all you'll know is whether you're dealing with an iPhone or an iPad.

The DeviceAtlas team solved this problem by identifying subtle differences between Apple devices using the client-side component. Now, accurate iPhone model detection is possible, with no impact on performance.

Detecting iPhone 8/X with DeviceAtlas

The following simple table shows how the DeviceAtlas client-side method can identify the exact model of iPhone:

Apple device Without client-side With client-side 1.6
iPhone 8 iPhone iPhone 8
iPhone 8 Plus iPhone iPhone 8 Plus
iPhone X iPhone iPhone X


Below is an example of just some of the further details and device characteristics available for the iPhone 8 Plus.

API input API output
Apple iPhone 8 Plus DeviceAtlas ID: 23118940
  Device Vendor: Apple
Device Model: iPhone 8 Plus
Marketing Name: iPhone 8 Plus
Manufacturer: Apple
Year Released: 2017
Mobile Device: True
Primary Hardware Type: Mobile Phone
Touch Screen: True
Screen Width: 1080
Screen Height: 1920
Display PPI: 401
Device Pixel Ratio:3
Screen Color Depth: 32
  NFC: True
  + 153 further data properties


With this extra data available, there are many examples of how you can streamline and optimise your content/ad delivery, even in the native app environment. For a more detailed guide on how to implement and customise the client-side component, click here.

Get access to a free, fully-working local version trial of DeviceAtlas.

Our high performance flagship product - the most complete data set.

Start Your Free Trial Today

iPhone 8/8 Plus/X User Agent

Below are examples of User Agent strings used by these three Apple devices. With DeviceAtlas, these "known-unknowns" become easy to detect, allowing you to optimise for more than just a device type.

iPhone 8 User Agent

iPhone 8
Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.34 (KHTML, like Gecko) Version/11.0 Mobile/15A5341f Safari/604.1

iPhone 8 Plus User Agent

iPhone 8 Plus
Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A5370a Safari/604.1

iPhone X User Agent

iPhone X
Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1


For advertisers and networks, correctly identifying a handset's CPU, GPU and RAM spec could encourage you to serve rich, high-resolution video content, whereas a slower device can be served a less resource-heavy alternative. Not only will this benefit you, but the device owner will appreciate a more appropriate use of their bandwidth or processing power.

Hardware device characteristics provide an excellent addition to all web analytics purposes where they complement other details on the visiting devices helping businesses to even better understand their mobile audience.

Want to find out more about User-Agent Strings and the DeviceAtlas solution? Read on:

Add device awareness to your platform

All advertising and web analytics solutions need a high-speed, accurate, low server footprint solution to detect devices.

For this purpose you can use DeviceAtlas device detection available as a locally-deployed solution.

Learn more