Detecting Ipad devices

POMPOM Member Posts: 2,599

Hey guys,
wondering how you detect iPad devices for universal apps..
Im using "WHEN game.scree.size.width IS 1024",
Is this gonna work for the retina iPads as well? (don't have one so can't check)
What is your method?

Cheers
Roy.

Comments

  • SocksSocks London, UK.Member Posts: 12,822
    edited October 2014

    @POM said:
    Hey guys,
    wondering how you detect iPad devices for universal apps..
    Im using "WHEN game.scree.size.width IS 1024",
    Is this gonna work for the retina iPads as well? (don't have one so can't check)
    What is your method?

    Cheers
    Roy.

    I don't know whether an iPad will return 2048 or 1024 (perhaps someone else will know), but you could always just detect the aspect ratio, if you calculate the aspect ratio as 4:3 you know you are dealing with an iPad, whether it's an old iPad 1 or a Retina iPad mini they will all return 4:3 regardless of their resolution.

  • JSprojectJSproject Member Posts: 730
    edited October 2014

    @POM said:
    Hey guys,
    wondering how you detect iPad devices for universal apps..
    Im using "WHEN game.scree.size.width IS 1024",
    Is this gonna work for the retina iPads as well? (don't have one so can't check)
    What is your method?

    Cheers
    Roy.

    That is correct (assuming your project is landscape).

    An unlocked actor with a rule checking for device-screen-size-width (translates to game.screen.size.width) = 1024 will detect iPad landscape correctly for both non-retina and retina iPads.

  • JSprojectJSproject Member Posts: 730

    Twin Swords 2 in progress? ;)

  • POMPOM Member Posts: 2,599

    @Socks
    Nice suggestion, thing is if "WHEN game.scree.size.width IS 1024" is working i prefer not to make changes, cause because we deal here with unlocked actors, who knows where i put these rules.. with hundreds of actors in every scene..
    @JSproject
    Do you have a retina iPad to test it in real world? just to know for sure?
    First updating Twin Swords 1, and publishing a new game, then maybe Twin Swords 2 lol

    Roy.

  • JSprojectJSproject Member Posts: 730

    @POM said:
    Do you have a retina iPad to test it in real world? just to know for sure?

    Technically no ;)
    I own these retina iPad models: 3, mini2, Air and next week Air 2 also.
    Yes, I have tested it on device via adhoc on both iPad retina and non-retina.

    First updating Twin Swords 1, and publishing a new game, then maybe Twin Swords 2 lol

    ok :)

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    @pom screen size for all iPads is 1024x768. Also good to see you back around!

  • LumpAppsLumpApps Member Posts: 2,881

    Yes @POM‌ good to see you!

  • POMPOM Member Posts: 2,599
    edited October 2014

    @JSproject , @The_Gamesalad_Guru , @LumpApps
    Cheers guys :)
    I still watching you every day haha, love this forum.

    New game is coming, hope you guys like it!

    Roy.

  • JSprojectJSproject Member Posts: 730

    @POM You're welcome :)

  • 2create2create Member, PRO Posts: 90

    See the image below.

    I create three vars for all devices and use game.Screen.Size.Width

    The 2nd condition (384) is for testing purposes (when testing it's better to view iPad version in 50% scale in viewer)

    Yops – the innovative puzzle game for iOs – http://apple.co/1ESvIlC
    Other games - http://appstore.com/flashpromllc/

  • POMPOM Member Posts: 2,599
    edited November 2014

    @iknikitin,
    Thanks for sharing, I'm doing a fairly similar method, just wanted to make sure that:

    "WHEN game.scree.size.width IS 1024", Is triggering retina iPads as well.

    Roy.

Sign In or Register to comment.