Skip to content

Commit

Permalink
refactor: Move CDVURLSchemeHandler to private API (#1477)
Browse files Browse the repository at this point in the history
This is only used by the WKWebView plugin, and there's no way to do
anything meaningful with it as public API, so it probably shouldn't be
public API.
  • Loading branch information
dpogue authored Aug 25, 2024
1 parent e327997 commit 8e59e52
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Licensed to the Apache Software Foundation (ASF) under one
*/


#import <Cordova/CDVURLSchemeHandler.h>
#import "CDVURLSchemeHandler.h"
#import <MobileCoreServices/MobileCoreServices.h>

#import <objc/message.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ Licensed to the Apache Software Foundation (ASF) under one

#import "CDVWebViewEngine.h"
#import "CDVWebViewUIDelegate.h"
#import "CDVURLSchemeHandler.h"
#import <Cordova/CDVWebViewProcessPoolFactory.h>
#import <Cordova/CDVSettingsDictionary.h>
#import <Cordova/CDVURLSchemeHandler.h>

#import <objc/message.h>

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 @@ -27,8 +27,6 @@
/* Begin PBXBuildFile section */
28BFF9141F355A4E00DDF01A /* CDVLogger.h in Headers */ = {isa = PBXBuildFile; fileRef = 28BFF9121F355A4E00DDF01A /* CDVLogger.h */; };
28BFF9151F355A4E00DDF01A /* CDVLogger.m in Sources */ = {isa = PBXBuildFile; fileRef = 28BFF9131F355A4E00DDF01A /* CDVLogger.m */; };
2F4D42BC23F218BA00501999 /* CDVURLSchemeHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 2F4D42BA23F218BA00501999 /* CDVURLSchemeHandler.h */; settings = {ATTRIBUTES = (Public, ); }; };
2F4D42BD23F218BA00501999 /* CDVURLSchemeHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F4D42BB23F218BA00501999 /* CDVURLSchemeHandler.m */; };
2FCCEA17247E7366007276A8 /* CDVLaunchScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E714D3423F535B500A321AF /* CDVLaunchScreen.m */; };
2FCCEA18247E7366007276A8 /* CDVLaunchScreen.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E714D3223F535B500A321AF /* CDVLaunchScreen.h */; };
3093E2231B16D6A3003F381A /* CDVIntentAndNavigationFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3093E2211B16D6A3003F381A /* CDVIntentAndNavigationFilter.h */; };
Expand All @@ -47,7 +45,6 @@
4F56D833254A2ED90063F1D6 /* CDVWebViewProcessPoolFactory.m in Sources */ = {isa = PBXBuildFile; fileRef = 4E23F8F523E16E96006CD852 /* CDVWebViewProcessPoolFactory.m */; };
4F56D836254A2EE10063F1D6 /* CDVWebViewEngine.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E23F8FA23E16E96006CD852 /* CDVWebViewEngine.h */; };
4F56D839254A2EE40063F1D6 /* CDVWebViewProcessPoolFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 4E23F8F923E16E96006CD852 /* CDVWebViewProcessPoolFactory.h */; settings = {ATTRIBUTES = (Public, ); }; };
4F56D83C254A2F2F0063F1D6 /* CDVURLSchemeHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 2F4D42BB23F218BA00501999 /* CDVURLSchemeHandler.m */; };
7E7F69B91ABA3692007546F4 /* CDVHandleOpenURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF81AB9028C008C4574 /* CDVHandleOpenURL.h */; };
7ED95D021AB9028C008C4574 /* CDVDebug.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF21AB9028C008C4574 /* CDVDebug.h */; };
7ED95D031AB9028C008C4574 /* CDVJSON_private.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF31AB9028C008C4574 /* CDVJSON_private.h */; };
Expand Down Expand Up @@ -88,6 +85,10 @@
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 */; };
9047732F2C7A57E900373636 /* CDVURLSchemeHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 9047732D2C7A57E900373636 /* CDVURLSchemeHandler.h */; };
904773302C7A57E900373636 /* CDVURLSchemeHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 9047732E2C7A57E900373636 /* CDVURLSchemeHandler.m */; };
904773312C7A57E900373636 /* CDVURLSchemeHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 9047732D2C7A57E900373636 /* CDVURLSchemeHandler.h */; };
904773322C7A57E900373636 /* CDVURLSchemeHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 9047732E2C7A57E900373636 /* CDVURLSchemeHandler.m */; };
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 @@ -112,7 +113,6 @@
9052DE8D2150D06B008E83D4 /* CDVGestureHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = A3B082D21BB15CEA00D8DC35 /* CDVGestureHandler.h */; };
9052DE8E2150D06B008E83D4 /* CDVIntentAndNavigationFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 3093E2211B16D6A3003F381A /* CDVIntentAndNavigationFilter.h */; };
9052DE8F2150D06B008E83D4 /* CDVHandleOpenURL.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ED95CF81AB9028C008C4574 /* CDVHandleOpenURL.h */; };
9059F51C26F2CE2400B3B2B7 /* CDVURLSchemeHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 2F4D42BA23F218BA00501999 /* CDVURLSchemeHandler.h */; settings = {ATTRIBUTES = (Public, ); }; };
9068B5332C6DFE2000B13532 /* CDVSettingsDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 9068B5322C6DFE2000B13532 /* CDVSettingsDictionary.h */; settings = {ATTRIBUTES = (Public, ); }; };
9068B5342C6DFE2000B13532 /* CDVSettingsDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 9068B5322C6DFE2000B13532 /* CDVSettingsDictionary.h */; settings = {ATTRIBUTES = (Public, ); }; };
9068B5362C6E007400B13532 /* CDVSettingsDictionary.m in Sources */ = {isa = PBXBuildFile; fileRef = 9068B5352C6E007400B13532 /* CDVSettingsDictionary.m */; };
Expand Down Expand Up @@ -145,8 +145,6 @@
/* Begin PBXFileReference section */
28BFF9121F355A4E00DDF01A /* CDVLogger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVLogger.h; sourceTree = "<group>"; };
28BFF9131F355A4E00DDF01A /* CDVLogger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVLogger.m; sourceTree = "<group>"; };
2F4D42BA23F218BA00501999 /* CDVURLSchemeHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CDVURLSchemeHandler.h; sourceTree = "<group>"; };
2F4D42BB23F218BA00501999 /* CDVURLSchemeHandler.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CDVURLSchemeHandler.m; sourceTree = "<group>"; };
3093E2211B16D6A3003F381A /* CDVIntentAndNavigationFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVIntentAndNavigationFilter.h; sourceTree = "<group>"; };
3093E2221B16D6A3003F381A /* CDVIntentAndNavigationFilter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVIntentAndNavigationFilter.m; sourceTree = "<group>"; };
4E23F8F523E16E96006CD852 /* CDVWebViewProcessPoolFactory.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CDVWebViewProcessPoolFactory.m; sourceTree = "<group>"; };
Expand Down Expand Up @@ -197,6 +195,8 @@
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>"; };
9047732D2C7A57E900373636 /* CDVURLSchemeHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CDVURLSchemeHandler.h; sourceTree = "<group>"; };
9047732E2C7A57E900373636 /* CDVURLSchemeHandler.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CDVURLSchemeHandler.m; sourceTree = "<group>"; };
9068B5322C6DFE2000B13532 /* CDVSettingsDictionary.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CDVSettingsDictionary.h; sourceTree = "<group>"; };
9068B5352C6E007400B13532 /* CDVSettingsDictionary.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CDVSettingsDictionary.m; sourceTree = "<group>"; };
A3B082D21BB15CEA00D8DC35 /* CDVGestureHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CDVGestureHandler.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -268,6 +268,8 @@
4E23F8F423E16D30006CD852 /* CDVWebViewEngine */ = {
isa = PBXGroup;
children = (
9047732D2C7A57E900373636 /* CDVURLSchemeHandler.h */,
9047732E2C7A57E900373636 /* CDVURLSchemeHandler.m */,
4E23F8FA23E16E96006CD852 /* CDVWebViewEngine.h */,
4E23F8F823E16E96006CD852 /* CDVWebViewEngine.m */,
4E23F8F623E16E96006CD852 /* CDVWebViewUIDelegate.h */,
Expand Down Expand Up @@ -338,7 +340,6 @@
7ED95D2B1AB9029B008C4574 /* CDVViewController.m */,
7ED95D321AB9029B008C4574 /* NSDictionary+CordovaPreferences.m */,
7ED95D341AB9029B008C4574 /* NSMutableArray+QueueAdditions.m */,
2F4D42BB23F218BA00501999 /* CDVURLSchemeHandler.m */,
);
name = Public;
path = Classes/Public;
Expand Down Expand Up @@ -373,7 +374,6 @@
7ED95D2A1AB9029B008C4574 /* CDVViewController.h */,
4E23F8F923E16E96006CD852 /* CDVWebViewProcessPoolFactory.h */,
7ED95D2C1AB9029B008C4574 /* CDVWebViewEngineProtocol.h */,
2F4D42BA23F218BA00501999 /* CDVURLSchemeHandler.h */,
7ED95D311AB9029B008C4574 /* NSDictionary+CordovaPreferences.h */,
7ED95D331AB9029B008C4574 /* NSMutableArray+QueueAdditions.h */,
);
Expand Down Expand Up @@ -411,7 +411,6 @@
C0C01EC41E39131A0056E6CB /* CDVPlugin+Resources.h in Headers */,
C0C01EC51E39131A0056E6CB /* CDVPlugin.h in Headers */,
C0C01EC61E39131A0056E6CB /* CDVPluginResult.h in Headers */,
9059F51C26F2CE2400B3B2B7 /* CDVURLSchemeHandler.h in Headers */,
C0C01EC71E39131A0056E6CB /* CDVScreenOrientationDelegate.h in Headers */,
4F56D836254A2EE10063F1D6 /* CDVWebViewEngine.h in Headers */,
C0C01EC81E39131A0056E6CB /* CDVTimer.h in Headers */,
Expand All @@ -428,6 +427,7 @@
903684402C6EB06500A3338C /* CDVAllowList.h in Headers */,
9052DE8E2150D06B008E83D4 /* CDVIntentAndNavigationFilter.h in Headers */,
9052DE8F2150D06B008E83D4 /* CDVHandleOpenURL.h in Headers */,
9047732F2C7A57E900373636 /* CDVURLSchemeHandler.h in Headers */,
2FCCEA18247E7366007276A8 /* CDVLaunchScreen.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand All @@ -446,7 +446,6 @@
7ED95D3D1AB9029B008C4574 /* CDVCommandQueue.h in Headers */,
4E23F8FF23E16E96006CD852 /* CDVWebViewProcessPoolFactory.h in Headers */,
7ED95D3F1AB9029B008C4574 /* CDVConfigParser.h in Headers */,
2F4D42BC23F218BA00501999 /* CDVURLSchemeHandler.h in Headers */,
7ED95D411AB9029B008C4574 /* CDVInvokedUrlCommand.h in Headers */,
7ED95D431AB9029B008C4574 /* CDVPlugin+Resources.h in Headers */,
7ED95D451AB9029B008C4574 /* CDVPlugin.h in Headers */,
Expand All @@ -468,6 +467,7 @@
9036843D2C6EB06500A3338C /* CDVAllowList.h in Headers */,
3093E2231B16D6A3003F381A /* CDVIntentAndNavigationFilter.h in Headers */,
7E7F69B91ABA3692007546F4 /* CDVHandleOpenURL.h in Headers */,
904773312C7A57E900373636 /* CDVURLSchemeHandler.h in Headers */,
4E714D3623F535B500A321AF /* CDVLaunchScreen.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -579,11 +579,11 @@
4F56D833254A2ED90063F1D6 /* CDVWebViewProcessPoolFactory.m in Sources */,
4F56D82D254A2EB50063F1D6 /* CDVWebViewEngine.m in Sources */,
9052DE7C2150D040008E83D4 /* CDVViewController.m in Sources */,
4F56D83C254A2F2F0063F1D6 /* CDVURLSchemeHandler.m in Sources */,
9052DE7E2150D040008E83D4 /* NSDictionary+CordovaPreferences.m in Sources */,
9052DE7F2150D040008E83D4 /* NSMutableArray+QueueAdditions.m in Sources */,
9052DE802150D040008E83D4 /* CDVJSON_private.m in Sources */,
9052DE812150D040008E83D4 /* CDVLogger.m in Sources */,
904773302C7A57E900373636 /* CDVURLSchemeHandler.m in Sources */,
9052DE822150D040008E83D4 /* CDVGestureHandler.m in Sources */,
9052DE832150D040008E83D4 /* CDVIntentAndNavigationFilter.m in Sources */,
9052DE842150D040008E83D4 /* CDVHandleOpenURL.m in Sources */,
Expand All @@ -602,7 +602,6 @@
7ED95D421AB9029B008C4574 /* CDVInvokedUrlCommand.m in Sources */,
7ED95D441AB9029B008C4574 /* CDVPlugin+Resources.m in Sources */,
9068B5372C6E007400B13532 /* CDVSettingsDictionary.m in Sources */,
2F4D42BD23F218BA00501999 /* CDVURLSchemeHandler.m in Sources */,
7ED95D461AB9029B008C4574 /* CDVPlugin.m in Sources */,
9036843E2C6EB06500A3338C /* CDVAllowList.m in Sources */,
7ED95D481AB9029B008C4574 /* CDVPluginResult.m in Sources */,
Expand All @@ -615,6 +614,7 @@
7ED95D041AB9028C008C4574 /* CDVJSON_private.m in Sources */,
4E23F8FD23E16E96006CD852 /* CDVWebViewUIDelegate.m in Sources */,
28BFF9151F355A4E00DDF01A /* CDVLogger.m in Sources */,
904773322C7A57E900373636 /* CDVURLSchemeHandler.m in Sources */,
A3B082D51BB15CEA00D8DC35 /* CDVGestureHandler.m in Sources */,
3093E2241B16D6A3003F381A /* CDVIntentAndNavigationFilter.m in Sources */,
7ED95D071AB9028C008C4574 /* CDVHandleOpenURL.m in Sources */,
Expand Down
1 change: 0 additions & 1 deletion CordovaLib/include/Cordova/Cordova.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#import <Cordova/NSMutableArray+QueueAdditions.h>
#import <Cordova/CDVScreenOrientationDelegate.h>
#import <Cordova/CDVTimer.h>
#import <Cordova/CDVURLSchemeHandler.h>

// Deprecated
#import <Cordova/CDV.h>
Expand Down

0 comments on commit 8e59e52

Please sign in to comment.