diff --git a/CordovaLib/include/Cordova/CDVAllowList.h b/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVAllowList.h similarity index 100% rename from CordovaLib/include/Cordova/CDVAllowList.h rename to CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVAllowList.h diff --git a/CordovaLib/Classes/Public/CDVAllowList.m b/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVAllowList.m similarity index 99% rename from CordovaLib/Classes/Public/CDVAllowList.m rename to CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVAllowList.m index 739ca980e..a0ce668e0 100644 --- a/CordovaLib/Classes/Public/CDVAllowList.m +++ b/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVAllowList.m @@ -17,7 +17,7 @@ Licensed to the Apache Software Foundation (ASF) under one under the License. */ -#import +#import "CDVAllowList.h" NSString* const kCDVDefaultAllowListRejectionString = @"ERROR allowList rejection: url='%@'"; NSString* const kCDVDefaultSchemeName = @"cdv-default-scheme"; diff --git a/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.h b/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.h index 652cb39a5..1e4bb3f76 100644 --- a/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.h +++ b/CordovaLib/Classes/Private/Plugins/CDVIntentAndNavigationFilter/CDVIntentAndNavigationFilter.h @@ -18,7 +18,7 @@ */ #import -#import +#import "CDVAllowList.h" #define CDVWebViewNavigationType int diff --git a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj index 1f934fb9d..5e16a8959 100644 --- a/CordovaLib/CordovaLib.xcodeproj/project.pbxproj +++ b/CordovaLib/CordovaLib.xcodeproj/project.pbxproj @@ -80,12 +80,14 @@ 7ED95D501AB9029B008C4574 /* CDVViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D2A1AB9029B008C4574 /* CDVViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7ED95D511AB9029B008C4574 /* CDVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D2B1AB9029B008C4574 /* CDVViewController.m */; }; 7ED95D521AB9029B008C4574 /* CDVWebViewEngineProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D2C1AB9029B008C4574 /* CDVWebViewEngineProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 7ED95D531AB9029B008C4574 /* CDVAllowList.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D2D1AB9029B008C4574 /* CDVAllowList.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 7ED95D541AB9029B008C4574 /* CDVAllowList.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D2E1AB9029B008C4574 /* CDVAllowList.m */; }; 7ED95D571AB9029B008C4574 /* NSDictionary+CordovaPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D311AB9029B008C4574 /* NSDictionary+CordovaPreferences.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7ED95D581AB9029B008C4574 /* NSDictionary+CordovaPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D321AB9029B008C4574 /* NSDictionary+CordovaPreferences.m */; }; 7ED95D591AB9029B008C4574 /* NSMutableArray+QueueAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D331AB9029B008C4574 /* NSMutableArray+QueueAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; 7ED95D5A1AB9029B008C4574 /* NSMutableArray+QueueAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D341AB9029B008C4574 /* NSMutableArray+QueueAdditions.m */; }; + 9036843D2C6EB06500A3338C /* CDVAllowList.h in Headers */ = {isa = PBXBuildFile; fileRef = 9036843B2C6EB06500A3338C /* CDVAllowList.h */; }; + 9036843E2C6EB06500A3338C /* CDVAllowList.m in Sources */ = {isa = PBXBuildFile; fileRef = 9036843C2C6EB06500A3338C /* CDVAllowList.m */; }; + 9036843F2C6EB06500A3338C /* CDVAllowList.m in Sources */ = {isa = PBXBuildFile; fileRef = 9036843C2C6EB06500A3338C /* CDVAllowList.m */; }; + 903684402C6EB06500A3338C /* CDVAllowList.h in Headers */ = {isa = PBXBuildFile; fileRef = 9036843B2C6EB06500A3338C /* CDVAllowList.h */; }; 9052DE712150D040008E83D4 /* CDVAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D111AB9029B008C4574 /* CDVAppDelegate.m */; }; 9052DE722150D040008E83D4 /* CDVCommandDelegateImpl.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D161AB9029B008C4574 /* CDVCommandDelegateImpl.m */; }; 9052DE732150D040008E83D4 /* CDVCommandQueue.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D181AB9029B008C4574 /* CDVCommandQueue.m */; }; @@ -96,7 +98,6 @@ 9052DE782150D040008E83D4 /* CDVPluginResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D221AB9029B008C4574 /* CDVPluginResult.m */; }; 9052DE792150D040008E83D4 /* CDVTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D251AB9029B008C4574 /* CDVTimer.m */; }; 9052DE7C2150D040008E83D4 /* CDVViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D2B1AB9029B008C4574 /* CDVViewController.m */; }; - 9052DE7D2150D040008E83D4 /* CDVAllowList.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D2E1AB9029B008C4574 /* CDVAllowList.m */; }; 9052DE7E2150D040008E83D4 /* NSDictionary+CordovaPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D321AB9029B008C4574 /* NSDictionary+CordovaPreferences.m */; }; 9052DE7F2150D040008E83D4 /* NSMutableArray+QueueAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95D341AB9029B008C4574 /* NSMutableArray+QueueAdditions.m */; }; 9052DE802150D040008E83D4 /* CDVJSON_private.m in Sources */ = {isa = PBXBuildFile; fileRef = 7ED95CF41AB9028C008C4574 /* CDVJSON_private.m */; }; @@ -133,7 +134,6 @@ C0C01EC81E39131A0056E6CB /* CDVTimer.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D241AB9029B008C4574 /* CDVTimer.h */; settings = {ATTRIBUTES = (Public, ); }; }; C0C01ECB1E39131A0056E6CB /* CDVViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D2A1AB9029B008C4574 /* CDVViewController.h */; settings = {ATTRIBUTES = (Public, ); }; }; C0C01ECC1E39131A0056E6CB /* CDVWebViewEngineProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D2C1AB9029B008C4574 /* CDVWebViewEngineProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C0C01ECD1E39131A0056E6CB /* CDVAllowList.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D2D1AB9029B008C4574 /* CDVAllowList.h */; settings = {ATTRIBUTES = (Public, ); }; }; C0C01ECE1E39131A0056E6CB /* NSDictionary+CordovaPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D311AB9029B008C4574 /* NSDictionary+CordovaPreferences.h */; settings = {ATTRIBUTES = (Public, ); }; }; C0C01ECF1E39131A0056E6CB /* NSMutableArray+QueueAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95D331AB9029B008C4574 /* NSMutableArray+QueueAdditions.h */; settings = {ATTRIBUTES = (Public, ); }; }; /* End PBXBuildFile section */ @@ -186,13 +186,13 @@ 7ED95D2A1AB9029B008C4574 /* CDVViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVViewController.h; sourceTree = ""; }; 7ED95D2B1AB9029B008C4574 /* CDVViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVViewController.m; sourceTree = ""; }; 7ED95D2C1AB9029B008C4574 /* CDVWebViewEngineProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVWebViewEngineProtocol.h; sourceTree = ""; }; - 7ED95D2D1AB9029B008C4574 /* CDVAllowList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVAllowList.h; sourceTree = ""; }; - 7ED95D2E1AB9029B008C4574 /* CDVAllowList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVAllowList.m; sourceTree = ""; }; 7ED95D311AB9029B008C4574 /* NSDictionary+CordovaPreferences.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+CordovaPreferences.h"; sourceTree = ""; }; 7ED95D321AB9029B008C4574 /* NSDictionary+CordovaPreferences.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+CordovaPreferences.m"; sourceTree = ""; }; 7ED95D331AB9029B008C4574 /* NSMutableArray+QueueAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableArray+QueueAdditions.h"; sourceTree = ""; }; 7ED95D341AB9029B008C4574 /* NSMutableArray+QueueAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableArray+QueueAdditions.m"; sourceTree = ""; }; 902D0BC12AEB64EB009C68E5 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; + 9036843B2C6EB06500A3338C /* CDVAllowList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CDVAllowList.h; sourceTree = ""; }; + 9036843C2C6EB06500A3338C /* CDVAllowList.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CDVAllowList.m; sourceTree = ""; }; A3B082D21BB15CEA00D8DC35 /* CDVGestureHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVGestureHandler.h; sourceTree = ""; }; A3B082D31BB15CEA00D8DC35 /* CDVGestureHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVGestureHandler.m; sourceTree = ""; }; C0C01EB21E3911D50056E6CB /* Cordova.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Cordova.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -251,6 +251,8 @@ 3093E2201B16D6A3003F381A /* CDVIntentAndNavigationFilter */ = { isa = PBXGroup; children = ( + 9036843B2C6EB06500A3338C /* CDVAllowList.h */, + 9036843C2C6EB06500A3338C /* CDVAllowList.m */, 3093E2211B16D6A3003F381A /* CDVIntentAndNavigationFilter.h */, 3093E2221B16D6A3003F381A /* CDVIntentAndNavigationFilter.m */, ); @@ -327,7 +329,6 @@ 7ED95D251AB9029B008C4574 /* CDVTimer.m */, 4E23F8F523E16E96006CD852 /* CDVWebViewProcessPoolFactory.m */, 7ED95D2B1AB9029B008C4574 /* CDVViewController.m */, - 7ED95D2E1AB9029B008C4574 /* CDVAllowList.m */, 7ED95D321AB9029B008C4574 /* NSDictionary+CordovaPreferences.m */, 7ED95D341AB9029B008C4574 /* NSMutableArray+QueueAdditions.m */, 2F4D42BB23F218BA00501999 /* CDVURLSchemeHandler.m */, @@ -364,7 +365,6 @@ 7ED95D2A1AB9029B008C4574 /* CDVViewController.h */, 4E23F8F923E16E96006CD852 /* CDVWebViewProcessPoolFactory.h */, 7ED95D2C1AB9029B008C4574 /* CDVWebViewEngineProtocol.h */, - 7ED95D2D1AB9029B008C4574 /* CDVAllowList.h */, 2F4D42BA23F218BA00501999 /* CDVURLSchemeHandler.h */, 7ED95D311AB9029B008C4574 /* NSDictionary+CordovaPreferences.h */, 7ED95D331AB9029B008C4574 /* NSMutableArray+QueueAdditions.h */, @@ -408,7 +408,6 @@ C0C01EC81E39131A0056E6CB /* CDVTimer.h in Headers */, C0C01ECB1E39131A0056E6CB /* CDVViewController.h in Headers */, C0C01ECC1E39131A0056E6CB /* CDVWebViewEngineProtocol.h in Headers */, - C0C01ECD1E39131A0056E6CB /* CDVAllowList.h in Headers */, C0C01ECE1E39131A0056E6CB /* NSDictionary+CordovaPreferences.h in Headers */, 4E23F90323E17FFA006CD852 /* CDVWebViewUIDelegate.h in Headers */, C0C01ECF1E39131A0056E6CB /* NSMutableArray+QueueAdditions.h in Headers */, @@ -417,6 +416,7 @@ 9052DE8B2150D06B008E83D4 /* CDVPlugin+Private.h in Headers */, 9052DE8C2150D06B008E83D4 /* CDVLogger.h in Headers */, 9052DE8D2150D06B008E83D4 /* CDVGestureHandler.h in Headers */, + 903684402C6EB06500A3338C /* CDVAllowList.h in Headers */, 9052DE8E2150D06B008E83D4 /* CDVIntentAndNavigationFilter.h in Headers */, 9052DE8F2150D06B008E83D4 /* CDVHandleOpenURL.h in Headers */, 2FCCEA18247E7366007276A8 /* CDVLaunchScreen.h in Headers */, @@ -448,7 +448,6 @@ 7ED95D501AB9029B008C4574 /* CDVViewController.h in Headers */, 7ED95D521AB9029B008C4574 /* CDVWebViewEngineProtocol.h in Headers */, 4E23F90023E16E96006CD852 /* CDVWebViewEngine.h in Headers */, - 7ED95D531AB9029B008C4574 /* CDVAllowList.h in Headers */, 7ED95D571AB9029B008C4574 /* NSDictionary+CordovaPreferences.h in Headers */, 7ED95D591AB9029B008C4574 /* NSMutableArray+QueueAdditions.h in Headers */, 7ED95D021AB9028C008C4574 /* CDVDebug.h in Headers */, @@ -456,6 +455,7 @@ 7ED95D051AB9028C008C4574 /* CDVPlugin+Private.h in Headers */, 28BFF9141F355A4E00DDF01A /* CDVLogger.h in Headers */, A3B082D41BB15CEA00D8DC35 /* CDVGestureHandler.h in Headers */, + 9036843D2C6EB06500A3338C /* CDVAllowList.h in Headers */, 3093E2231B16D6A3003F381A /* CDVIntentAndNavigationFilter.h in Headers */, 7E7F69B91ABA3692007546F4 /* CDVHandleOpenURL.h in Headers */, 4E714D3623F535B500A321AF /* CDVLaunchScreen.h in Headers */, @@ -561,13 +561,13 @@ 9052DE762150D040008E83D4 /* CDVPlugin+Resources.m in Sources */, 9052DE772150D040008E83D4 /* CDVPlugin.m in Sources */, 9052DE782150D040008E83D4 /* CDVPluginResult.m in Sources */, + 9036843F2C6EB06500A3338C /* CDVAllowList.m in Sources */, 4F56D830254A2ED70063F1D6 /* CDVWebViewUIDelegate.m in Sources */, 9052DE792150D040008E83D4 /* CDVTimer.m in Sources */, 4F56D833254A2ED90063F1D6 /* CDVWebViewProcessPoolFactory.m in Sources */, 4F56D82D254A2EB50063F1D6 /* CDVWebViewEngine.m in Sources */, 9052DE7C2150D040008E83D4 /* CDVViewController.m in Sources */, 4F56D83C254A2F2F0063F1D6 /* CDVURLSchemeHandler.m in Sources */, - 9052DE7D2150D040008E83D4 /* CDVAllowList.m in Sources */, 9052DE7E2150D040008E83D4 /* NSDictionary+CordovaPreferences.m in Sources */, 9052DE7F2150D040008E83D4 /* NSMutableArray+QueueAdditions.m in Sources */, 9052DE802150D040008E83D4 /* CDVJSON_private.m in Sources */, @@ -591,12 +591,12 @@ 7ED95D441AB9029B008C4574 /* CDVPlugin+Resources.m in Sources */, 2F4D42BD23F218BA00501999 /* CDVURLSchemeHandler.m in Sources */, 7ED95D461AB9029B008C4574 /* CDVPlugin.m in Sources */, + 9036843E2C6EB06500A3338C /* CDVAllowList.m in Sources */, 7ED95D481AB9029B008C4574 /* CDVPluginResult.m in Sources */, 7ED95D4B1AB9029B008C4574 /* CDVTimer.m in Sources */, 4E23F8FE23E16E96006CD852 /* CDVWebViewEngine.m in Sources */, 4E23F8FB23E16E96006CD852 /* CDVWebViewProcessPoolFactory.m in Sources */, 7ED95D511AB9029B008C4574 /* CDVViewController.m in Sources */, - 7ED95D541AB9029B008C4574 /* CDVAllowList.m in Sources */, 7ED95D581AB9029B008C4574 /* NSDictionary+CordovaPreferences.m in Sources */, 7ED95D5A1AB9029B008C4574 /* NSMutableArray+QueueAdditions.m in Sources */, 7ED95D041AB9028C008C4574 /* CDVJSON_private.m in Sources */, diff --git a/CordovaLib/include/Cordova/CDV.h b/CordovaLib/include/Cordova/CDV.h index c7ad0a575..83913dc9d 100644 --- a/CordovaLib/include/Cordova/CDV.h +++ b/CordovaLib/include/Cordova/CDV.h @@ -32,7 +32,6 @@ #import #import #import -#import #import #import #import diff --git a/CordovaLib/include/Cordova/CDVCommandDelegate.h b/CordovaLib/include/Cordova/CDVCommandDelegate.h index 76b952313..2efe4a488 100644 --- a/CordovaLib/include/Cordova/CDVCommandDelegate.h +++ b/CordovaLib/include/Cordova/CDVCommandDelegate.h @@ -22,7 +22,6 @@ @class CDVPlugin; @class CDVPluginResult; -@class CDVAllowList; typedef NSURL* (^ UrlTransformerBlock)(NSURL*); diff --git a/tests/CordovaLibTests/CDVAllowListTests.m b/tests/CordovaLibTests/CDVAllowListTests.m index 8a6f0f170..d823614e1 100644 --- a/tests/CordovaLibTests/CDVAllowListTests.m +++ b/tests/CordovaLibTests/CDVAllowListTests.m @@ -19,7 +19,7 @@ Licensed to the Apache Software Foundation (ASF) under one #import -#import +#import "CDVAllowList.h" #import "CDVIntentAndNavigationFilter.h" @interface CDVAllowListTests : XCTestCase