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 2015/09/12 02:06:16 UTC

cordova-plugins git commit: Removed hard-coded runtime version check, detect feature instead

Repository: cordova-plugins
Updated Branches:
  refs/heads/master 2d3370ddc -> 2e2830935


Removed hard-coded runtime version check, detect feature instead


Project: http://git-wip-us.apache.org/repos/asf/cordova-plugins/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugins/commit/2e283093
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugins/tree/2e283093
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugins/diff/2e283093

Branch: refs/heads/master
Commit: 2e2830935409c957f7df4d6d80b90343d24c1ae5
Parents: 2d3370d
Author: Shazron Abdullah <sh...@apache.org>
Authored: Fri Sep 11 17:10:08 2015 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Fri Sep 11 17:10:08 2015 -0700

----------------------------------------------------------------------
 local-webserver/src/ios/CDVLocalWebServer.m | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugins/blob/2e283093/local-webserver/src/ios/CDVLocalWebServer.m
----------------------------------------------------------------------
diff --git a/local-webserver/src/ios/CDVLocalWebServer.m b/local-webserver/src/ios/CDVLocalWebServer.m
index 3d43389..8664fc1 100644
--- a/local-webserver/src/ios/CDVLocalWebServer.m
+++ b/local-webserver/src/ios/CDVLocalWebServer.m
@@ -138,21 +138,20 @@
 
 - (BOOL) checkRequirements
 {
-    NSString* runtimeVersion = @"8.0";
     NSString* pluginName = @"CDVWKWebViewEngine";
 
-    BOOL ios8 = IsAtLeastiOSVersion(runtimeVersion);
+    BOOL hasWkWebView = NSClassFromString(@"WKWebView") != nil;
     BOOL wkEnginePlugin = [[self.commandDelegate.settings cordovaSettingForKey:@"CordovaWebViewEngine"] isEqualToString:pluginName];
 
-    if (!ios8) {
-        NSLog(@"[ERROR] %@: Runtime requirement required is at least iOS %@", [self class], runtimeVersion);
+    if (!hasWkWebView) {
+        NSLog(@"[ERROR] %@: WKWebView class not found in the current runtime version.", [self class]);
     }
 
     if (!wkEnginePlugin) {
         NSLog(@"[ERROR] %@: CordovaWebViewEngine preference must be %@", [self class], pluginName);
     }
 
-    return ios8 && wkEnginePlugin;
+    return hasWkWebView && wkEnginePlugin;
 }
 
 - (NSString*) createErrorUrl:(NSString*)error authToken:(NSString*)authToken


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org