Return-Path: X-Original-To: apmail-cordova-commits-archive@www.apache.org Delivered-To: apmail-cordova-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1F68518A67 for ; Mon, 16 Nov 2015 12:55:24 +0000 (UTC) Received: (qmail 29727 invoked by uid 500); 16 Nov 2015 12:55:23 -0000 Delivered-To: apmail-cordova-commits-archive@cordova.apache.org Received: (qmail 29698 invoked by uid 500); 16 Nov 2015 12:55:23 -0000 Mailing-List: contact commits-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@cordova.apache.org Received: (qmail 29686 invoked by uid 99); 16 Nov 2015 12:55:23 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Nov 2015 12:55:23 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B018FE009E; Mon, 16 Nov 2015 12:55:23 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: shazron@apache.org To: commits@cordova.apache.org Message-Id: <320c391ca240441da0a132b164328cb4@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: spec commit: CB-9972 - Remove iOS whitelist Date: Mon, 16 Nov 2015 12:55:23 +0000 (UTC) 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 Authored: Wed Nov 11 16:15:59 2015 -0800 Committer: Shazron Abdullah 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 @@ - - - - - - - - - - - - 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 -#import - -@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 -#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