Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 581EDDBC8 for ; Thu, 30 Aug 2012 21:46:08 +0000 (UTC) Received: (qmail 85563 invoked by uid 500); 30 Aug 2012 21:46:07 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 85522 invoked by uid 500); 30 Aug 2012 21:46:07 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 85513 invoked by uid 99); 30 Aug 2012 21:46:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Aug 2012 21:46:07 +0000 Date: Fri, 31 Aug 2012 08:46:07 +1100 (NCT) From: "Shazron Abdullah (JIRA)" To: callback-dev@incubator.apache.org Message-ID: <573858756.18418.1346363167673.JavaMail.jiratomcat@arcas> In-Reply-To: <1823143906.6738.1346168469725.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (CB-1288) position.timestamp.getTime() fails on iOS, ok on Android MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-1288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13445323#comment-13445323 ] Shazron Abdullah commented on CB-1288: -------------------------------------- Tested it using: https://gist.github.com/3541951 So far for me, no repro - position.timestamp is always a Date object. Please test using the test case above and report. > position.timestamp.getTime() fails on iOS, ok on Android > -------------------------------------------------------- > > Key: CB-1288 > URL: https://issues.apache.org/jira/browse/CB-1288 > Project: Apache Cordova > Issue Type: Bug > Components: iOS > Affects Versions: 2.0.0 > Reporter: Mr. Extreme > Assignee: Shazron Abdullah > Fix For: 2.1.0 > > > Take this piece of code: > {code:javascript} > gpsWatchId = navigator.geolocation.watchPosition( > function( position ) // success > { > positionTimestamp = position.timestamp.getTime(); > } > // don't forget the rest of the code > {code} > position.timestamp will be a Date object on Android, so even alert( position.timestamp ) works. On iOS 5, it causes the JS engine to fall over with some fatal error, rendering the whole app useless. You have to replace the code with your own "x = new Date; y = x.getTime();" code. If I saw correctly position.timestamp is non-existent on iOS. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira