From e173438ec3b99c5fd00e5cb6815328e73bca88ce Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Mon, 12 Aug 2024 17:17:26 -0700 Subject: [PATCH] refactor: Move the CDVWebViewEngineConfigurationDelegate protocol --- .../include/Cordova/CDVViewController.h | 18 ------------------ .../Cordova/CDVWebViewEngineProtocol.h | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/CordovaLib/include/Cordova/CDVViewController.h b/CordovaLib/include/Cordova/CDVViewController.h index 4858232cb9..0cf14b0c8e 100644 --- a/CordovaLib/include/Cordova/CDVViewController.h +++ b/CordovaLib/include/Cordova/CDVViewController.h @@ -28,24 +28,6 @@ #import #import -@protocol CDVWebViewEngineConfigurationDelegate - -@optional -/// Provides a fully configured WKWebViewConfiguration which will be overriden with -/// any related settings you add to config.xml (e.g., `PreferredContentMode`). -/// Useful for more complex configuration, including websiteDataStore. -/// -/// Example usage: -/// -/// extension CDVViewController: CDVWebViewEngineConfigurationDelegate { -/// public func configuration() -> WKWebViewConfiguration { -/// // return your config here -/// } -/// } -- (nonnull WKWebViewConfiguration*)configuration; - -@end - /*! @abstract The main view controller for Cordova web content. */ diff --git a/CordovaLib/include/Cordova/CDVWebViewEngineProtocol.h b/CordovaLib/include/Cordova/CDVWebViewEngineProtocol.h index 40187bca30..0d3f0bf777 100644 --- a/CordovaLib/include/Cordova/CDVWebViewEngineProtocol.h +++ b/CordovaLib/include/Cordova/CDVWebViewEngineProtocol.h @@ -49,3 +49,22 @@ NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END @end + + +@protocol CDVWebViewEngineConfigurationDelegate + +@optional +/// Provides a fully configured WKWebViewConfiguration which will be overriden with +/// any related settings you add to config.xml (e.g., `PreferredContentMode`). +/// Useful for more complex configuration, including websiteDataStore. +/// +/// Example usage: +/// +/// extension CDVViewController: CDVWebViewEngineConfigurationDelegate { +/// public func configuration() -> WKWebViewConfiguration { +/// // return your config here +/// } +/// } +- (nonnull WKWebViewConfiguration*)configuration; + +@end