Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7DEB0D7C5 for ; Wed, 7 Nov 2012 21:58:53 +0000 (UTC) Received: (qmail 88573 invoked by uid 500); 7 Nov 2012 21:58:53 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 88544 invoked by uid 500); 7 Nov 2012 21:58:53 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 88535 invoked by uid 99); 7 Nov 2012 21:58:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Nov 2012 21:58:53 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of shazron@gmail.com designates 209.85.220.47 as permitted sender) Received: from [209.85.220.47] (HELO mail-pa0-f47.google.com) (209.85.220.47) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Nov 2012 21:58:47 +0000 Received: by mail-pa0-f47.google.com with SMTP id fa11so1351255pad.6 for ; Wed, 07 Nov 2012 13:58:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=dRTNjRoNki3q5lS61KgVAhU6I84tsZuRH9fYU02oFCE=; b=ozZfxjExsnBnZ2RJdY+9v81xJwtn3c837CIb1sP3b3nX6mebCTz3v6lykbd4sBApt0 l+eOfkBNQZJK5Ua+08cskyOF5jNcFzoV2O6unnSi5V+lRIcUmW3pnnYoWjUilePE9L2N 6TShAMa2tXFBxB0pt4W4WAEjGMwwk3zrTnJwyaWd4vFEFBWhIXdc2buyaRmdwzcwFVLo ySoPhECfi19/s7pUJSi949XeE13h38kolnI3V10w8DrDH7Ryg/1isjurP5UV3XMQopAt bLkJZVSsVAkzuwMbU7jWNvbH7MHEAYPAf4RoJJZb5oGrBENmTw1K0jzuZdf68Og8vPnf Q6EA== Received: by 10.68.200.72 with SMTP id jq8mr17658092pbc.38.1352325505819; Wed, 07 Nov 2012 13:58:25 -0800 (PST) MIME-Version: 1.0 Received: by 10.66.159.67 with HTTP; Wed, 7 Nov 2012 13:57:45 -0800 (PST) In-Reply-To: References: From: Shazron Date: Wed, 7 Nov 2012 13:57:45 -0800 Message-ID: Subject: Re: iOS' device API To: "dev@cordova.apache.org" Content-Type: multipart/alternative; boundary=047d7b111a2765225f04cdeed187 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b111a2765225f04cdeed187 Content-Type: text/plain; charset=ISO-8859-1 Also, if we remove the device API like Brian suggested, it would be good in the sense that we won't have to call the CDVDevice plugin to populate some js variables before deviceready can fire -- eliminating a dependency. On Wed, Nov 7, 2012 at 11:00 AM, Shazron wrote: > 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-agentbut 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 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" 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 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. >> >> >> >> >> >> > --047d7b111a2765225f04cdeed187--