[
https://issues.apache.org/jira/browse/CB-12451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15865248#comment-15865248
]
Mark commented on CB-12451:
---------------------------
Thanks for the feedback. I am requesting this issue to be reconsidered because
i think you possibly misunderstood the failure.
I understand that everything is now a UIView and was changed because of various
reasons, but the problem i am actually raising is that :
1. even if i cast it as a UIWebView when i call the super then the super fails
compilation. CDVViewController does not have the selector for the delegate.
2. even if i cast it as a UIWebView when calling
stringByEvaluatingJavaScriptFromString the javascript is never executed, or
atleast does NOT run in the same virtual machine as my phonegap app started in
and therefore does not have access to any of the functions in there.
3. deviceready is never called. The app has to lose focus before it continues
to load.
All of these used to work before and now are completely broken simply because
of this cordova upgrade. Can you point me to an online repository that clearly
shows the workaround from definition in the .h file all the way to the callback
delegate super call if i am still wrong ?
> webViewDidFinishLoad delegate no longer available in CDVViewController
> ----------------------------------------------------------------------
>
> Key: CB-12451
> URL: https://issues.apache.org/jira/browse/CB-12451
> Project: Apache Cordova
> Issue Type: Bug
> Components: CordovaLib, iOS
> Affects Versions: [email protected]
> 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
> Assignee: jcesarmobile
> Fix For: [email protected]
>
>
> 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
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]