8

In our project we are storing all the information of the device in the claim store using context engine. It is working fine for all the mobile devices, But for IPhone it is only returning the device model not the version.

To fulfill the requirement we have decided to check the PPI of the device or the height and width of the device to ensure the version of IPhone.

The issue we are now facing - it is behaving properly when we are hitting the site from chrome browser only.

Is there any dependency of discover-min.js on the browser ?

Below are the result set for IPhone 4

Chrome:

taf:claim:context:device:model            --> IPhone
taf:claim:context:device:pixelDensity     --> 326
taf:claim:context:device:displayWidth     --> 320
taf:claim:context:device:displayHeight    --> 480

Safari:

taf:claim:context:device:model            --> IPhone
taf:claim:context:device:pixelDensity     --> 217
taf:claim:context:device:displayWidth     --> 750
taf:claim:context:device:displayHeight    --> 1334

Please suggest..

1 Answer 1

3

@Sayantan, in this case the issue is related to the iPhone's user-agent being vague. The discover-min.js can only discover the information that is made available by the vendors. In this case we can only blame Apple.

3
  • Is there another workaround? Other than calling Apple and blaming them for this, I mean.
    – Nuno Linhares
    Commented May 3, 2017 at 12:28
  • 1
    I should say no. But what we have done for that situation was - Along with PPI we also checked the browser version and then determined the model and assigned it to a custom claim uri. Commented May 3, 2017 at 12:41
  • Exactly. We had to work out the model by using other available device information. Commented May 3, 2017 at 12:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.