cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shazron <shaz...@gmail.com>
Subject Re: iOS' device API
Date Wed, 07 Nov 2012 19:00:38 GMT
Agree with Fil to make it consistent - in essence this is an iOS bug :)

Brian, there is one case I can think of -- detecting the iPad mini's
features using js - Max Firt investigated trying to do it
http://www.mobilexweb.com/blog/ipad-mini-detection-for-html5-user-agent but
the only kludgy way right now using PG would be device.platform to detect
iPad2,5 and iPad2,6. I suppose ppl would need to detect this to enlarge
certain UI elements for the mini (since the physical area will be smaller
than a reg sized iPad)


On Wed, Nov 7, 2012 at 10:06 AM, Filip Maj <fil@adobe.com> wrote:

> CI implementation is what I am gunning for here (and can actually use it).
>
> I don't like it either but reality is for people building cross-platform
> apps at some point you have to do:
>
> if (device.platform == 'android') // do some stuff
>
> For example, knowing when to attach to a back button vs rendering some ui
> to handle that.
>
> IMO we should set up deprecation for "name" and move to "model" as it's
> clearer (and probably was the reason why iOS went for device's custom name
> in the first place - semantic confusion :P )
>
> On 11/7/12 7:35 AM, "Brian LeRoux" <b@brian.io> wrote:
>
> >This may get some rotton tomatoes thrown at me but I would be in favor of
> >axing these apis altogether. I think they are more dangerous than useful /
> >developers should favor browser feature detection for their UI work.
> >
> >There is no programmatic reason to want these properties otherwise that I
> >can think of?
> >
> >(But agree at least should be consistent as Fil suggests.)
> >
> >
> >On Tue, Nov 6, 2012 at 4:40 PM, Filip Maj <fil@adobe.com> wrote:
> >
> >> Currently if you ask for device.platform you will get several different
> >> responses on iOS. You'll get iPhone, iPad, iPod Touch, etc. This seems
> >> backwards. IMO all of these should return 'iOS'.
> >>
> >> Related, device.name returns the custom device name as the user defines
> >>it
> >> in iTunes. IMO it should return the model name, I.e. What
> >>device.platform
> >> returns now.
> >>
> >> This would line it up with our docs + other platforms.
> >>
> >>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message