How do I detect if the device is iphone x or not?

  • hi,

    How do I detect if the device is iphone x or not?

    thank you

  • any ideas please?

    thank you

  • What do you need this for ?

    Use Browser object expressions to check device pixel ratio and screen size (Iphone X specs are 2 436 x 1 125 pixels at 458 pop) and browser platform that returns Windows, Mac, IOs..

  • What do you need this for ?

    and browser platform that returns Windows, Mac, IOs..

    what do you mean exactly ?

    thank you very much

  • > What do you need this for ?

    > and browser platform that returns Windows, Mac, IOs..

    >

    what do you mean exactly ?

    thank you very much

    I mean Browser object can tel you what platform the browser that runs your game is.

    Taken from manual :

    "UserAgent browser expression returns the full user agent string for the browser, e.g. Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63."

  • What do you need this for ?

    Use Browser object expressions to check device pixel ratio and screen size (Iphone X specs are 2 436 x 1 125 pixels at 458 pop) and browser platform that returns Windows, Mac, IOs..

    hi

    i did try this (picture attached)

    but it not work

  • > What do you need this for ?

    > Use Browser object expressions to check device pixel ratio and screen size (Iphone X specs are 2 436 x 1 125 pixels at 458 pop) and browser platform that returns Windows, Mac, IOs..

    >

    hi

    i did try this (picture attached)

    but it not work

    Try to check screen size and/ord UserAgent browser instead

  • >

    > > What do you need this for ?

    > > Use Browser object expressions to check device pixel ratio and screen size (Iphone X specs are 2 436 x 1 125 pixels at 458 pop) and browser platform that returns Windows, Mac, IOs..

    > >

    >

    > hi

    > i did try this (picture attached)

    > but it not work

    >

    >

    Try to check screen size and/ord UserAgent browser instead

    still same with using Browser.ScreenWidth equal to 1125 and Browser.Screenheight equal to 2436

    how i use the useragent please?

    thank you

  • [quote:2jxudnup]

    still same with using Browser.ScreenWidth equal to 1125 and Browser.Screenheight equal to 2436

    how i use the useragent please?

    thank you

    Your code screen capture seems incomplete. What happens if condition is met ?

  • I already had that issue, I found a way to detect iOS - it works for me every time:

    If you want to be more specific to iPhone X, look what Navigator returns on iPhone X.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I already had that issue, I found a way to detect iOS - it works for me every time:

    If you want to be more specific to iPhone X, look what Navigator returns on iPhone X.

    can you be more specific ?

    thank you

  • I already had that issue, I found a way to detect iOS - it works for me every time:

    If you want to be more specific to iPhone X, look what Navigator returns on iPhone X.

    ?

    thanks

  • any help please ?

    i can't find a way

    thank you

  • any help please ?

    i can't find a way

    thank you

    Do you have an iphone X to test on? If so, check to see what the javascript call above returns for it.

  • > any help please ?

    > i can't find a way

    > thank you

    >

    Do you have an iphone X to test on? If so, check to see what the javascript call above returns for it.

    yes ok but how to check what the javascript call above returns for it ?

    thank you

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)