Return nil in init for wkwebview-engine if the runtime does not support it.
Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-wkwebview-engine/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-wkwebview-engine/commit/0a8c3091 Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-wkwebview-engine/tree/0a8c3091 Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-wkwebview-engine/diff/0a8c3091 Branch: refs/heads/master Commit: 0a8c309180a23014229e832029a70d4d49ea1d26 Parents: def716c Author: Shazron Abdullah <[email protected]> Authored: Mon Nov 10 09:42:10 2014 -0800 Committer: Shazron Abdullah <[email protected]> Committed: Mon Nov 10 09:42:10 2014 -0800 ---------------------------------------------------------------------- src/ios/CDVWKWebViewEngine.m | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-wkwebview-engine/blob/0a8c3091/src/ios/CDVWKWebViewEngine.m ---------------------------------------------------------------------- diff --git a/src/ios/CDVWKWebViewEngine.m b/src/ios/CDVWKWebViewEngine.m index 94ef0b2..fd81e37 100644 --- a/src/ios/CDVWKWebViewEngine.m +++ b/src/ios/CDVWKWebViewEngine.m @@ -42,6 +42,9 @@ { self = [super init]; if (self) { + if (!IsAtLeastiOSVersion(@"8.0")) { + return nil; + } self.uiDelegate = [[CDVWKWebViewUIDelegate alloc] initWithTitle:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"]]; WKUserContentController* userContentController = [[WKUserContentController alloc] init]; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
