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 18447D20F for ; Tue, 13 Nov 2012 18:34:14 +0000 (UTC) Received: (qmail 93015 invoked by uid 500); 13 Nov 2012 18:34:13 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 92988 invoked by uid 500); 13 Nov 2012 18:34:13 -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 92947 invoked by uid 500); 13 Nov 2012 18:34:13 -0000 Delivered-To: apmail-incubator-callback-dev@incubator.apache.org Received: (qmail 92926 invoked by uid 99); 13 Nov 2012 18:34:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Nov 2012 18:34:13 +0000 Date: Tue, 13 Nov 2012 18:34:13 +0000 (UTC) From: "Andrew Grieve (JIRA)" To: callback-dev@incubator.apache.org Message-ID: <1543390101.109112.1352831653703.JavaMail.jiratomcat@arcas> In-Reply-To: <763122672.108977.1352829613302.JavaMail.jiratomcat@arcas> Subject: [jira] [Commented] (CB-1843) Echo plugin doesn't work in iOS 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-1843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13496393#comment-13496393 ] Andrew Grieve commented on CB-1843: ----------------------------------- Hey Aaron, Could you try this same example except without the native code part? In 2.0 we added an Echo plugin to the core distro for benchmarking purposes and I'm wondering if it's conflicting here. I just tried creating a new project and adding the JS changes you listed (via copy & paste) and I go an alert(true) on start-up using the 6.0 iPad simulator. > Echo plugin doesn't work in iOS > ------------------------------- > > Key: CB-1843 > URL: https://issues.apache.org/jira/browse/CB-1843 > Project: Apache Cordova > Issue Type: Bug > Components: iOS > Affects Versions: 2.2.0 > Environment: iPad2, iOS Simulator, iOS 6, XCode 4.5.2 > Reporter: Aaron Moman > Assignee: Andrew Grieve > > I'm using the base application for iOS created with the create script. That works correctly. I add the Echo plugin example Objective-C code and everything compiles. Then I add the JS to call it and that's when things get weird. > In index.js, after the var app = { ... }; statement I add: > window.echo = function(str, callback) { > cordova.exec(callback, function(err) { > callback('Nothing to echo.'); > }, "Echo", "echo", [str]); > }; > Then in onDeviceReady I add the following after the receivedEvent call: > window.echo("echome", function(echoValue) { alert(echoValue == "echome"); }); > I run the app and I get the green glowing "Device is ready" message. So we're getting into onDeviceReady successfully. But the "true" alert never pops up. > Until I double-click on the home button. Then when the running apps show at the bottom of the screen, then the alert pops up. I tap back into the app and I can click to dismiss the alert. > What's going on here? It seems like the example plug-in should work a little better than this. > The reason I'm doing this at all is that I'm seeing similar behavior in my app that I'm currently failing to upgrade from 2.1 to 2.2. > Worse: If I single-click the home button and then go back to the app, I get the alert pop-up, but after I click on it the screen goes black. > Any help would be greatly appreciated. > Thanks, > Aaron -- 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