Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor!: Move CDVAllowList out of public API #1463

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Licensed to the Apache Software Foundation (ASF) under one
under the License.
*/

#import <Cordova/CDVAllowList.h>
#import "CDVAllowList.h"

NSString* const kCDVDefaultAllowListRejectionString = @"ERROR allowList rejection: url='%@'";
NSString* const kCDVDefaultSchemeName = @"cdv-default-scheme";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

#import <Cordova/CDVPlugin.h>
#import <Cordova/CDVAllowList.h>
#import "CDVAllowList.h"

#define CDVWebViewNavigationType int

Expand Down
24 changes: 12 additions & 12 deletions CordovaLib/CordovaLib.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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 */; };
Expand All @@ -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 */; };
Expand Down Expand Up @@ -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 */
Expand Down Expand Up @@ -186,13 +186,13 @@
7ED95D2A1AB9029B008C4574 /* CDVViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVViewController.h; sourceTree = "<group>"; };
7ED95D2B1AB9029B008C4574 /* CDVViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVViewController.m; sourceTree = "<group>"; };
7ED95D2C1AB9029B008C4574 /* CDVWebViewEngineProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVWebViewEngineProtocol.h; sourceTree = "<group>"; };
7ED95D2D1AB9029B008C4574 /* CDVAllowList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVAllowList.h; sourceTree = "<group>"; };
7ED95D2E1AB9029B008C4574 /* CDVAllowList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVAllowList.m; sourceTree = "<group>"; };
7ED95D311AB9029B008C4574 /* NSDictionary+CordovaPreferences.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSDictionary+CordovaPreferences.h"; sourceTree = "<group>"; };
7ED95D321AB9029B008C4574 /* NSDictionary+CordovaPreferences.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSDictionary+CordovaPreferences.m"; sourceTree = "<group>"; };
7ED95D331AB9029B008C4574 /* NSMutableArray+QueueAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSMutableArray+QueueAdditions.h"; sourceTree = "<group>"; };
7ED95D341AB9029B008C4574 /* NSMutableArray+QueueAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSMutableArray+QueueAdditions.m"; sourceTree = "<group>"; };
902D0BC12AEB64EB009C68E5 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
9036843B2C6EB06500A3338C /* CDVAllowList.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CDVAllowList.h; sourceTree = "<group>"; };
9036843C2C6EB06500A3338C /* CDVAllowList.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CDVAllowList.m; sourceTree = "<group>"; };
A3B082D21BB15CEA00D8DC35 /* CDVGestureHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVGestureHandler.h; sourceTree = "<group>"; };
A3B082D31BB15CEA00D8DC35 /* CDVGestureHandler.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVGestureHandler.m; sourceTree = "<group>"; };
C0C01EB21E3911D50056E6CB /* Cordova.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Cordova.framework; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -251,6 +251,8 @@
3093E2201B16D6A3003F381A /* CDVIntentAndNavigationFilter */ = {
isa = PBXGroup;
children = (
9036843B2C6EB06500A3338C /* CDVAllowList.h */,
9036843C2C6EB06500A3338C /* CDVAllowList.m */,
3093E2211B16D6A3003F381A /* CDVIntentAndNavigationFilter.h */,
3093E2221B16D6A3003F381A /* CDVIntentAndNavigationFilter.m */,
);
Expand Down Expand Up @@ -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 */,
Expand Down Expand Up @@ -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 */,
Expand Down Expand Up @@ -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 */,
Expand All @@ -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 */,
Expand Down Expand Up @@ -448,14 +448,14 @@
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 */,
7ED95D031AB9028C008C4574 /* CDVJSON_private.h in Headers */,
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 */,
Expand Down Expand Up @@ -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 */,
Expand All @@ -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 */,
Expand Down
1 change: 0 additions & 1 deletion CordovaLib/include/Cordova/CDV.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#import <Cordova/CDVWebViewProcessPoolFactory.h>
#import <Cordova/NSDictionary+CordovaPreferences.h>
#import <Cordova/NSMutableArray+QueueAdditions.h>
#import <Cordova/CDVAllowList.h>
#import <Cordova/CDVScreenOrientationDelegate.h>
#import <Cordova/CDVTimer.h>
#import <Cordova/CDVURLSchemeHandler.h>
1 change: 0 additions & 1 deletion CordovaLib/include/Cordova/CDVCommandDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

@class CDVPlugin;
@class CDVPluginResult;
@class CDVAllowList;

typedef NSURL* (^ UrlTransformerBlock)(NSURL*);

Expand Down
2 changes: 1 addition & 1 deletion tests/CordovaLibTests/CDVAllowListTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Licensed to the Apache Software Foundation (ASF) under one

#import <XCTest/XCTest.h>

#import <Cordova/CDVAllowList.h>
#import "CDVAllowList.h"
#import "CDVIntentAndNavigationFilter.h"

@interface CDVAllowListTests : XCTestCase
Expand Down