cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Björn Vermeule (JIRA) <>
Subject [jira] [Updated] (CB-6633) Embedding the WebView on iOS breaks all plugins
Date Tue, 06 May 2014 08:04:15 GMT


Björn Vermeule updated CB-6633:


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 by commenting out the code in AppDelegate.didFinishLaunchingWithOptions.
The MainViewModel also no longer derives from CDVViewModel but from UIViewModel.

There's a simple plugin that only logs to console when called. You'll see that 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:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 3.4.0
>            Reporter: Björn Vermeule
>            Assignee: Shazron Abdullah
>              Labels: cordova, cordova_plugins.js,, ios
>         Attachments:
> I have manually embedded the WebView on a Storyboard in iOS. I've done this by generating
a new application using the Cordova CLI and then commenting the initialization part in AppDelegate.didFinishLaunchingWithOptions.
I have then created a ViewController that sits between the Storyboard and the generated controller
that derives from CDVViewController. Embedding the WebView works perfectly fine this way.
However, all communication between JavaScript and the native code has stopped working. This
also means the DeviceReady 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 implemented functions
do not get called.
> * I have put breakpoints in all functions of CDVCommandQueue in CordovaLib but none get
> * 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:
> If you want code or let me debug something please let me know. This applies to Cordova

This message was sent by Atlassian JIRA

View raw message