From 6ed6fc44798b8e8d00eea0d1d57066e707dacc66 Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Mon, 12 Aug 2024 17:13:08 -0700 Subject: [PATCH] refactor!: Deprecate and remove some unused orientation code --- CordovaLib/Classes/Public/CDVViewController.m | 63 ------------------- .../Cordova/CDVScreenOrientationDelegate.h | 1 + .../include/Cordova/CDVViewController.h | 13 ++-- 3 files changed, 5 insertions(+), 72 deletions(-) diff --git a/CordovaLib/Classes/Public/CDVViewController.m b/CordovaLib/Classes/Public/CDVViewController.m index 39206bbbdc..f6e79dc9ee 100644 --- a/CordovaLib/Classes/Public/CDVViewController.m +++ b/CordovaLib/Classes/Public/CDVViewController.m @@ -55,7 +55,6 @@ @interface CDVViewController () { } @implementation CDVViewController -@synthesize supportedOrientations; @synthesize pluginObjects, pluginsMap, startupPluginNames; @synthesize configParser, settings; @synthesize wwwFolderName, startPage, initialized, openURL; @@ -84,9 +83,6 @@ - (void)__init [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onWebViewPageDidLoad:) name:CDVPageDidLoadNotification object:nil]; - // read from UISupportedInterfaceOrientations (or UISupportedInterfaceOrientations~iPad, if its iPad) from -Info.plist - self.supportedOrientations = [self parseInterfaceOrientations: - [[[NSBundle mainBundle] infoDictionary] objectForKey:@"UISupportedInterfaceOrientations"]]; self.initialized = YES; } @@ -351,65 +347,6 @@ -(void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id +CDV_DEPRECATED(8, "Unused") @protocol CDVScreenOrientationDelegate - (UIInterfaceOrientationMask)supportedInterfaceOrientations; diff --git a/CordovaLib/include/Cordova/CDVViewController.h b/CordovaLib/include/Cordova/CDVViewController.h index 8429505157..4858232cb9 100644 --- a/CordovaLib/include/Cordova/CDVViewController.h +++ b/CordovaLib/include/Cordova/CDVViewController.h @@ -46,7 +46,10 @@ @end -@interface CDVViewController : UIViewController { +/*! + @abstract The main view controller for Cordova web content. + */ +@interface CDVViewController : UIViewController { @protected id _webViewEngine; @protected @@ -73,20 +76,12 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, readonly, strong) id webViewEngine; @property (nonatomic, readonly, strong) id commandDelegate; -/** - Takes/Gives an array of UIInterfaceOrientation (int) objects - ex. UIInterfaceOrientationPortrait -*/ -@property (nonatomic, readwrite, strong) NSArray* supportedOrientations; - (UIView*)newCordovaViewWithFrame:(CGRect)bounds; - (nullable NSString*)appURLScheme; - (nullable NSURL*)errorURL; -- (NSArray*)parseInterfaceOrientations:(NSArray*)orientations; -- (BOOL)supportsOrientation:(UIInterfaceOrientation)orientation; - - (nullable id)getCommandInstance:(NSString*)pluginName; - (void)registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className; - (void)registerPlugin:(CDVPlugin*)plugin withPluginName:(NSString*)pluginName;