You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2014/11/10 18:43:40 UTC
ios commit: Use default web view engine (UIWebView) if external web
engine is not supported in the current runtime version,
or it doesn't conform to the protocol.
Repository: cordova-ios
Updated Branches:
refs/heads/wkwebview c343e2ec3 -> 3487ffba9
Use default web view engine (UIWebView) if external web engine is not supported in the current runtime version, or it doesn't conform to the protocol.
Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/3487ffba
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/3487ffba
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/3487ffba
Branch: refs/heads/wkwebview
Commit: 3487ffba992bd3f2cca447d357f6768f0dacaf37
Parents: c343e2e
Author: Shazron Abdullah <sh...@gmail.com>
Authored: Mon Nov 10 09:43:37 2014 -0800
Committer: Shazron Abdullah <sh...@gmail.com>
Committed: Mon Nov 10 09:43:37 2014 -0800
----------------------------------------------------------------------
CordovaLib/Classes/CDVViewController.m | 4 ++++
1 file changed, 4 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/3487ffba/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m
index a76b6e7..e59bdd7 100644
--- a/CordovaLib/Classes/CDVViewController.m
+++ b/CordovaLib/Classes/CDVViewController.m
@@ -435,6 +435,10 @@
// Find webViewEngine
if (NSClassFromString(webViewEngineClass)) {
self.webViewEngine = [[NSClassFromString(webViewEngineClass) alloc] initWithFrame:bounds];
+ // if a webView engine returns nil (not supported by the current iOS version) or doesn't conform to the protocol, we use UIWebView
+ if (!self.webViewEngine || ![self.webViewEngine conformsToProtocol:@protocol(CDVWebViewEngineProtocol)]) {
+ self.webViewEngine = [[NSClassFromString(defaultWebViewEngineClass) alloc] initWithFrame:bounds];
+ }
} else {
self.webViewEngine = [[NSClassFromString(defaultWebViewEngineClass) alloc] initWithFrame:bounds];
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org