Screen Sizes Question

Hi all,
I need to use screen resolution in order to get device name (I want to display an alert when a user uses an iPad 2 or below),
I tried using

dim screenRes as Text = self.Size.Width.ToText + "x" +  self.Size.Height.ToText

but it does return me always the same value.
How can I fix it? Or how can I detect whether te user uses an iPad 2 or below?

[quote=208665:@Manuel Romei]Hi all,
I need to use screen resolution in order to get device name (I want to display an alert when a user uses an iPad 2 or below),
I tried using

dim screenRes as Text = self.Size.Width.ToText + "x" +  self.Size.Height.ToText

but it does return me always the same value.
How can I fix it? Or how can I detect whether te user uses an iPad 2 or below?[/quote]

All iPads have a screen 1024 x 768 points. See http://ios-resolution.com/

Also, see https://forum.xojo.com/18242-what-device-am-i

Thank you Michel,
I was probably confused by the difference between points and pixels.

So there isn’t any way to detect the exact model the user is using?

[quote=208671:@Manuel Romei]Thank you Michel,
I was probably confused by the difference between points and pixels.

So there isn’t any way to detect the exact model the user is using?[/quote]

If you follow the thread I pointed to, there are indeed ways, but mostly through declares.

I didn’t found anything that could help me detecting the precise model of an iPad (But probably it’s me and it would confirm my fear that I’m dumb as hell).

There may be additional declares today, but at the time, the conclusion we had was that indeed there was no way to distinguish between iPad models.

Thank you very much Michel for your fast replies. I will find another idea for my project

Do you need to tell if iPad2, vs iPadRetina vs iPadMini?

You CAN tell between iPad2 and iPadRetina, but the Mini and the Retina model respond exactly the same

iPad2 does NOT support a Retina display while all other models do

Ciao Manuel,
with UIDevice you can get the model type.
with UIScreen you can get if it is retina or not.
with sysctlbyname you can get the model name (as apple code) but is no a simple declare… and probably is not what you need.

Ciao Antonio, grazie.

The UIScreen should help me, but I’m not very good with declares.
I checked on Apple docs and there is nativeBound, it’s a property that represents the physical screen measured in pixels.
I can check if the screen is Retina or not, am I right?

I was under the impression one could set minimum device requirements in iTunes Connect, as you see them listed in the App Store under the buy button.

Apple allows you to support iPhone and/or iPad
but if you elect to support iPhone you must support ALL of them.
You can specifiy what level it works best with, but it must work on all of them or it will be rejected.
You can specifiy that it must support certain hardware requirements (accelormeter, camera, microphone etc), but Screen resolution is not a criteria you can specify.

As of right now that gives you 6 levels of devices (4 iphone, 2 iPad)

  • iPhone4s

  • iPhone5s (this include some of the iPod Touch which have same screen size, but may have less hardware criteria)

  • iPhone6 (the soon to be released iPhone6s will most likely fit here as well)

  • iPhone6+

  • iPad2 (this device is non-Retina, and I think also covers the original iPad mini)

  • iPad Retina (this is the full size iPad as well as the iPad Mini2 and 3)

  • not to mention the soon to be released iPad Pro

My app needs a lot of computing power and I found out that with the iPad 2 and with the iPad mini 2 it doesn’t work properly and it tends to lag. So I decided to show a message when a user doesn’t have the best hardware.

At the moment my app would run only on iPads.

You can support

  • All iPhones AND All iPads
    -or
  • All iPhones and NO iPads
    -or
  • All iPads and NO iPhones

but you cannot support “some iPads” and not others… UNLESS you specifiy some hardware requirement (as I mentioned) that the iPad2 does NOT have…

Showing a message, might just get you rejected… as the user will have to download and install you app, and then have you tell them it won’t “work”. I doubt Apple will allow you to do that.

https://developer.apple.com/library/ios/documentation/DeviceInformation/Reference/iOSDeviceCompatibility/DeviceCompatibilityMatrix/DeviceCompatibilityMatrix.html

Not sure how in XOJO you can specify any of this.

Got it.
I’m gonna do some optimizing here and there. Let’s see what will happen.
Thank you very much Dave.