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 D6980D392 for ; Thu, 8 Nov 2012 17:34:49 +0000 (UTC) Received: (qmail 55447 invoked by uid 500); 8 Nov 2012 17:34:49 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 55411 invoked by uid 500); 8 Nov 2012 17:34:49 -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 55401 invoked by uid 99); 8 Nov 2012 17:34:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Nov 2012 17:34:49 +0000 X-ASF-Spam-Status: No, hits=0.3 required=5.0 tests=FRT_ADOBE2,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of fil@adobe.com designates 64.18.1.236 as permitted sender) Received: from [64.18.1.236] (HELO exprod6og120.obsmtp.com) (64.18.1.236) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 08 Nov 2012 17:34:43 +0000 Received: from outbound-smtp-2.corp.adobe.com ([193.104.215.16]) by exprod6ob120.postini.com ([64.18.5.12]) with SMTP ID DSNKUJvtHEED8Nha1Z/4cLvU+ILBqSZW9Qb/@postini.com; Thu, 08 Nov 2012 09:34:22 PST Received: from inner-relay-4.eur.adobe.com (inner-relay-4b [10.128.4.237]) by outbound-smtp-2.corp.adobe.com (8.12.10/8.12.10) with ESMTP id qA8HYJHP014713 for ; Thu, 8 Nov 2012 09:34:19 -0800 (PST) Received: from nahub01.corp.adobe.com (nahub01.corp.adobe.com [10.8.189.97]) by inner-relay-4.eur.adobe.com (8.12.10/8.12.9) with ESMTP id qA8HYIXL007511 for ; Thu, 8 Nov 2012 09:34:19 -0800 (PST) Received: from nambxv01a.corp.adobe.com ([10.8.189.95]) by nahub01.corp.adobe.com ([10.8.189.97]) with mapi; Thu, 8 Nov 2012 09:34:18 -0800 From: Filip Maj To: "dev@cordova.apache.org" Date: Thu, 8 Nov 2012 09:34:19 -0800 Subject: Re: iOS' device API Thread-Topic: iOS' device API Thread-Index: Ac2910cXwnXxmEpmTiOVcE9bl8bhgA== Message-ID: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Microsoft-MacOutlook/14.2.4.120824 acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org +1 On 11/8/12 4:01 AM, "Brian LeRoux" wrote: >I think would it make sense to: > >1. align apis as orig msg from fil suggests >2. drop in deprecation notice for sync usage and add to deprec page >3. add async equiv and get it out of startup path as andrew suggests > > > > >On Wed, Nov 7, 2012 at 7:13 PM, Filip Maj wrote: > >> Although I think we're close to being able to author cross-platform apps >> sans UA detection , I think people still have valid use cases to use it. >> >> On 11/7/12 6:18 PM, "Andrew Grieve" wrote: >> >> >I like the idea of at least removing this from the start-up path. If >>users >> >want to know about the device, they could always call exec() >>themselves. >> > >> > >> >On Wed, Nov 7, 2012 at 4:57 PM, Shazron wrote: >> > >> >> 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 >> >> > >> >> >> >> >>=20 >>http://www.mobilexweb.com/blog/ipad-mini-detection-for-html5-user-agentbu >> >>tthe 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 =3D=3D '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. >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> > >> >> >> >>