[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]
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).
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.
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?
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)
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.
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.