Return-Path: X-Original-To: apmail-cordova-issues-archive@minotaur.apache.org Delivered-To: apmail-cordova-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1460311A68 for ; Tue, 6 May 2014 08:04:19 +0000 (UTC) Received: (qmail 83144 invoked by uid 500); 6 May 2014 08:04:18 -0000 Delivered-To: apmail-cordova-issues-archive@cordova.apache.org Received: (qmail 83079 invoked by uid 500); 6 May 2014 08:04:17 -0000 Mailing-List: contact issues-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 issues@cordova.apache.org Received: (qmail 82977 invoked by uid 99); 6 May 2014 08:04:15 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 May 2014 08:04:15 +0000 Date: Tue, 6 May 2014 08:04:15 +0000 (UTC) From: =?utf-8?Q?Bj=C3=B6rn_Vermeule_=28JIRA=29?= To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CB-6633) Embedding the WebView on iOS breaks all plugins MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-6633?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:all-tabpanel ] Bj=C3=B6rn Vermeule updated CB-6633: ------------------------------- Attachment: hello.zip I have attached the following project. This is basically the Cordova hello = world project generated by the CLI. I have added a storyboard where I embed= a Cordova WebView and prevented Cordova from setting the root view model b= y commenting out the code in AppDelegate.didFinishLaunchingWithOptions. The= MainViewModel also no longer derives from CDVViewModel but from UIViewMode= l. There's a simple plugin that only logs to console when called. You'll see t= hat with the embedded WebView the function never gets called. However, when= enabling the code again in AppDelegate.didFinishLaunchingWithOptions (and = thus letting Cordova set the root view model again) the plugin gets called = successfully. > Embedding the WebView on iOS breaks all plugins > ----------------------------------------------- > > Key: CB-6633 > URL: https://issues.apache.org/jira/browse/CB-6633 > Project: Apache Cordova > Issue Type: Bug > Components: iOS > Affects Versions: 3.4.0 > Reporter: Bj=C3=B6rn Vermeule > Assignee: Shazron Abdullah > Labels: cordova, cordova_plugins.js,, ios > Attachments: hello.zip > > > I have manually embedded the WebView on a Storyboard in iOS. I've done th= is by generating a new application using the Cordova CLI and then commentin= g the initialization part in AppDelegate.didFinishLaunchingWithOptions. I h= ave then created a ViewController that sits between the Storyboard and the = generated controller that derives from CDVViewController. Embedding the Web= View works perfectly fine this way. However, all communication between Java= Script and the native code has stopped working. This also means the DeviceR= eady event does not get fired. > I have tried the following: > * It works fine on Android (but this might be less relevant) > * Tried overriding CDVCommandQueue and CDVCommandDelegateImpl but the imp= lemented functions do not get called. > * I have put breakpoints in all functions of CDVCommandQueue in CordovaLi= b but none get called. > * cordova.exec gets successfully called on JavaScripts' end. > * Uncommenting the code in AppDelegate.didFinishLaunchingWithOptions (and= thus overriding the embedded view) works perfectly > * This applies to the Camera plugin and a simple custom plugin I made. > I'm completely lost trying to find what the cause of this is. All I could= find was this which seemed pretty much the same: http://stackoverflow.com/= questions/19634361/cordova-3-0-on-ios-plugin-method-not-being-called/198545= 28 > If you want code or let me debug something please let me know. This appli= es to Cordova 3.4.1 -- This message was sent by Atlassian JIRA (v6.2#6252)