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/11/16 13:55:23 UTC
spec commit: CB-9972 - Remove iOS whitelist
Repository: cordova-mobile-spec
Updated Branches:
refs/heads/master ad230e26b -> adfeb49a6
CB-9972 - Remove iOS whitelist
Project: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/commit/adfeb49a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/tree/adfeb49a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/diff/adfeb49a
Branch: refs/heads/master
Commit: adfeb49a67f20c8bcbfc6c2194cb252c31d6734d
Parents: ad230e2
Author: Shazron Abdullah <sh...@apache.org>
Authored: Wed Nov 11 16:15:59 2015 -0800
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Wed Nov 11 16:15:59 2015 -0800
----------------------------------------------------------------------
cordova-plugin-whitelist/plugin.xml | 12 -----
.../src/ios/CDVWhitelistAPI.h | 29 ------------
.../src/ios/CDVWhitelistAPI.m | 48 --------------------
3 files changed, 89 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/adfeb49a/cordova-plugin-whitelist/plugin.xml
----------------------------------------------------------------------
diff --git a/cordova-plugin-whitelist/plugin.xml b/cordova-plugin-whitelist/plugin.xml
index 49ea5fd..89e35f3 100644
--- a/cordova-plugin-whitelist/plugin.xml
+++ b/cordova-plugin-whitelist/plugin.xml
@@ -56,16 +56,4 @@
<source-file src="src/ubuntu/whitelist.cpp" />
</platform>
- <!-- ios -->
- <platform name="ios">
- <config-file target="config.xml" parent="/*">
- <feature name="WhitelistAPI">
- <param name="ios-package" value="CDVWhitelistAPI"/>
- </feature>
- </config-file>
-
- <header-file src="src/ios/CDVWhitelistAPI.h" />
- <source-file src="src/ios/CDVWhitelistAPI.m" />
- </platform>
-
</plugin>
http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/adfeb49a/cordova-plugin-whitelist/src/ios/CDVWhitelistAPI.h
----------------------------------------------------------------------
diff --git a/cordova-plugin-whitelist/src/ios/CDVWhitelistAPI.h b/cordova-plugin-whitelist/src/ios/CDVWhitelistAPI.h
deleted file mode 100644
index 01b1028..0000000
--- a/cordova-plugin-whitelist/src/ios/CDVWhitelistAPI.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <UIKit/UIKit.h>
-#import <Cordova/CDVPlugin.h>
-
-@interface CDVWhitelistAPI : CDVPlugin
-{}
-
-- (void)URLMatchesPatterns:(CDVInvokedUrlCommand*)command;
-- (void)URLIsAllowed:(CDVInvokedUrlCommand*)command;
-
-@end
http://git-wip-us.apache.org/repos/asf/cordova-mobile-spec/blob/adfeb49a/cordova-plugin-whitelist/src/ios/CDVWhitelistAPI.m
----------------------------------------------------------------------
diff --git a/cordova-plugin-whitelist/src/ios/CDVWhitelistAPI.m b/cordova-plugin-whitelist/src/ios/CDVWhitelistAPI.m
deleted file mode 100644
index 4c41144..0000000
--- a/cordova-plugin-whitelist/src/ios/CDVWhitelistAPI.m
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements. See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership. The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied. See the License for the
- specific language governing permissions and limitations
- under the License.
- */
-
-#import <Cordova/CDV.h>
-#import "CDVWhitelistAPI.h"
-
-@implementation CDVWhitelistAPI
-
-- (void)URLMatchesPatterns:(CDVInvokedUrlCommand*)command
-{
- NSString *url = [command argumentAtIndex:0];
- NSArray *allowedHosts = [command argumentAtIndex:1];
-
- CDVWhitelist* whitelist = [[CDVWhitelist alloc] initWithArray:allowedHosts];
-
- bool isAllowed = [whitelist URLIsAllowed:[NSURL URLWithString:url]];
- CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:isAllowed];
- [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
-}
-
-- (void)URLIsAllowed:(CDVInvokedUrlCommand*)command
-{
- NSString *url = [command argumentAtIndex:0];
-
- CDVViewController* vc = (CDVViewController *)self.viewController;
-
- bool isAllowed = [vc URLisAllowed:[NSURL URLWithString:url]];
- CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsBool:isAllowed];
- [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
-}
-
-@end
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org