Can i check, if iam on ipad or iphone?

0 favourites
  • 3 posts
  • Hello!

    My question is: Is it possible to check, which device is used? I need to check if its ipad or iphone, because the ios api seems to be differend on both devices.

    (On the iPad embedded videos in construct2 can be triggered with my own sprite - thats pretty cool, but on iphone there is no chance to play it trough the "start" sprite, like on ipads...thats pretty bad - so i would need to check, if the user is playing the app with an iphone or ipad to change the code, depending on their device. On Iphone the videos have their own play button, so my sprites, would be ignored and above the video (because its for ipads too) - thats a weird paradox problem)

    If no one has a solution...i think i would try to check the screen height and the screen width and calculate the ratio (iphones often have a 16:9 format and ipads 4:3).... i hope this would work.

    But iam very happy about any information from you, probably there is a "more safe" solution, because iam not sure if the get windowHeight/windowWidth from construct2 will check the device wH/wW.

    Thank you very much.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would do it with screenHeight/Width.

    or you can try: http://blog.marko-kastelec.com/2015/09/ ... avascript/

  • gumshoe2029

    I did it with WindowHeight/WindowWidth and it works perfectly!

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