0

I've developed a libGDX game and ported it to iOS using RoboVM. I want to display a certain feature on iPad but it should not be on iPhone. How to detect if the device is an iPad or an iPhone?

DroidHeaven
  • 2,414
  • 3
  • 25
  • 31

1 Answers1

0

One way to do this would be to test the resolution of the game. As far as I know the iPad and iPhone have different resolutions. This method however isn't ideal, so you should probably use platform specific code to test this.

Take a look at these two SO questions:

iOS detect if user is on an iPad

API to determine whether running on iPhone or iPad

Community
  • 1
  • 1
tobloef
  • 1,821
  • 3
  • 21
  • 38