cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark (JIRA)" <>
Subject [jira] [Created] (CB-12451) webViewDidFinishLoad delegate no longer available in CDVViewController
Date Sat, 11 Feb 2017 08:43:41 GMT
Mark created CB-12451:

             Summary: webViewDidFinishLoad delegate no longer available in CDVViewController
                 Key: CB-12451
             Project: Apache Cordova
          Issue Type: Bug
          Components: CordovaLib, iOS
    Affects Versions: cordova-ios@4.3.1
         Environment: phonegap cli version 6.4.3, cordova cli 6.5.0, cordova platform version
iOS 4.3.1. Project uses default UIWebView. Problem is experienced on iOS 9.3.5 through 10.2
on iPhone 4, iPhone 4S and iPhone 5 (these were only the ones tested)
            Reporter: Mark
             Fix For: cordova-ios@4.3.1

This is a phone gap project and all object types are exactly as created when the cordova platform
add iOS CLI command is executed. When using UIWebView, I manually change the interface (.h)
for MainViewController.h which is a CDVViewController type to call the delegates (by adding
<UIWebViewDelegate> to the interface, which means the webViewDidFinishLoad gets called,
but compile fails on the [super webViewDidFinishLoad:theWebView] call with the message that
there is no interface in CDVViewController for webViewDidFinishLoad. When I check the CDVViewController.m
and .h files, I see the selectors / methods are no longer present when comparing to pre-4.0
cordova versions. If I then remove the [super ...] call to get it to compile then the deviceready
is never called and i have to make my app lose focus before it will load.Ive added in the
required <meta> tag to index.html which has no effect. I am aware the delegate is present
in other files such as the navigator and CDVUIWebViewDelegate.h but these are not called or
available from CDVViewController.

I have a few apps that rely on this once standard delegate callback. I need it to be called
because it is the only way i can think of to get a reference to the UIWebView that cordova
uses as default. Sure, I can access self.webView or even reference the viewController webview
property in other places but NONE of these are UIWebView... they are all UIView and do not
allow me to call the stringByEvaluatingJavaScriptByString selector in order to execute JavaScript
in the same "virtual machine" as my app runs and therefore have access to the methods in there.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message