ios: Deprecate legacy core components (#53455)

Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/53455

All these components have fabric replacements.

Let's deprecate them, so we can remove them eventually.

Changelog: [iOS][Deprecated] Deprecate all the legacy core components that have replacement implementations in fabric.

Reviewed By: cipolleschi

Differential Revision: D80973216

fbshipit-source-id: 2b20da0800f099244b4813abf9d8af175627a445
This commit is contained in:
Ramanpreet Nara
2025-08-28 11:13:17 -07:00
committed by Facebook GitHub Bot
parent 70f53ac4ea
commit 5e80d5c76f
55 changed files with 96 additions and 35 deletions
@@ -9,6 +9,7 @@
#ifndef RCT_FIT_RM_OLD_COMPONENT
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTImageShadowView : RCTShadowView
@end
@@ -14,6 +14,7 @@
@class RCTBridge;
@class RCTImageSource;
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTImageView : RCTView
- (instancetype)initWithBridge:(RCTBridge *)bridge NS_DESIGNATED_INITIALIZER;
@@ -9,6 +9,7 @@
#ifndef RCT_FIT_RM_OLD_COMPONENT
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTImageViewManager : RCTViewManager
@end
@@ -13,8 +13,10 @@
NS_ASSUME_NONNULL_BEGIN
extern NSString *const RCTBaseTextShadowViewEmbeddedShadowViewAttributeName;
extern NSString *const RCTBaseTextShadowViewEmbeddedShadowViewAttributeName
__attribute__((deprecated("This API will be removed along with the legacy architecture.")));
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTBaseTextShadowView : RCTShadowView {
@protected
NSAttributedString *_Nullable cachedAttributedText;
@@ -11,6 +11,7 @@
NS_ASSUME_NONNULL_BEGIN
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTBaseTextViewManager : RCTViewManager
@end
@@ -15,15 +15,18 @@
NS_ASSUME_NONNULL_BEGIN
extern NSString *const RCTTextAttributesIsHighlightedAttributeName;
extern NSString *const RCTTextAttributesTagAttributeName;
extern NSString *const RCTTextAttributesIsHighlightedAttributeName
__attribute__((deprecated("This API will be removed along with the legacy architecture.")));
extern NSString *const RCTTextAttributesTagAttributeName
__attribute__((deprecated("This API will be removed along with the legacy architecture.")));
/**
* Represents knowledge about all supported *text* attributes
* assigned to some text component such as <Text>, <VirtualText>,
* and <TextInput>.
*/
@interface RCTTextAttributes : NSObject <NSCopying>
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTTextAttributes : NSObject<NSCopying>
// Color
@property (nonatomic, strong, nullable) UIColor *foregroundColor;
@@ -11,6 +11,7 @@
NS_ASSUME_NONNULL_BEGIN
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTRawTextShadowView : RCTShadowView
@property (nonatomic, copy, nullable) NSString *text;
@@ -11,6 +11,7 @@
NS_ASSUME_NONNULL_BEGIN
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTRawTextViewManager : RCTViewManager
@end
@@ -13,6 +13,7 @@
NS_ASSUME_NONNULL_BEGIN
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTTextShadowView : RCTBaseTextShadowView
- (instancetype)initWithBridge:(RCTBridge *)bridge;
@@ -13,6 +13,7 @@
NS_ASSUME_NONNULL_BEGIN
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTTextView : UIView
@property (nonatomic, assign) BOOL selectable;
@@ -11,6 +11,7 @@
#import "RCTBaseTextViewManager.h"
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTTextViewManager : RCTBaseTextViewManager
@end
@@ -11,6 +11,7 @@
NS_ASSUME_NONNULL_BEGIN
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTMultilineTextInputView : RCTBaseTextInputView
@end
@@ -11,6 +11,7 @@
NS_ASSUME_NONNULL_BEGIN
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTMultilineTextInputViewManager : RCTBaseTextInputViewManager
@end
@@ -11,6 +11,7 @@
NS_ASSUME_NONNULL_BEGIN
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTBaseTextInputShadowView : RCTBaseTextShadowView
- (instancetype)initWithBridge:(RCTBridge *)bridge;
@@ -20,7 +20,8 @@
NS_ASSUME_NONNULL_BEGIN
@interface RCTBaseTextInputView : RCTView <RCTBackedTextInputDelegate>
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTBaseTextInputView : RCTView<RCTBackedTextInputDelegate>
- (instancetype)initWithBridge:(RCTBridge *)bridge NS_DESIGNATED_INITIALIZER;
@@ -9,6 +9,7 @@
#ifndef RCT_FIT_RM_OLD_COMPONENT
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTBaseTextInputViewManager : RCTBaseTextViewManager
@end
@@ -9,6 +9,7 @@
#ifndef RCT_FIT_RM_OLD_COMPONENT
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTInputAccessoryShadowView : RCTShadowView
@end
@@ -12,6 +12,7 @@
@class RCTBridge;
@class RCTInputAccessoryViewContent;
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTInputAccessoryView : UIView
- (instancetype)initWithBridge:(RCTBridge *)bridge;
@@ -9,6 +9,7 @@
#ifndef RCT_FIT_RM_OLD_COMPONENT
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTInputAccessoryViewContent : UIView
@end
@@ -9,6 +9,7 @@
#ifndef RCT_FIT_RM_OLD_COMPONENT
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTInputAccessoryViewManager : RCTViewManager
@end
@@ -11,6 +11,7 @@
NS_ASSUME_NONNULL_BEGIN
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTSinglelineTextInputView : RCTBaseTextInputView
@end
@@ -11,6 +11,7 @@
NS_ASSUME_NONNULL_BEGIN
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTSinglelineTextInputViewManager : RCTBaseTextInputViewManager
@end
@@ -9,6 +9,7 @@
#ifndef RCT_FIT_RM_OLD_COMPONENT
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTVirtualTextShadowView : RCTBaseTextShadowView
@end
@@ -13,6 +13,7 @@
NS_ASSUME_NONNULL_BEGIN
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTVirtualTextView : UIView
/**
@@ -9,6 +9,7 @@
#ifndef RCT_FIT_RM_OLD_COMPONENT
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTVirtualTextViewManager : RCTBaseTextViewManager
@end
@@ -11,6 +11,7 @@
NS_ASSUME_NONNULL_BEGIN
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTWrapperExampleView : UIView
@end
@@ -11,6 +11,7 @@
NS_ASSUME_NONNULL_BEGIN
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTWrapperExampleViewController : UIViewController
@end
@@ -13,6 +13,7 @@
NS_ASSUME_NONNULL_BEGIN
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTWrapperReactRootViewController : UIViewController
- (instancetype)initWithBridge:(RCTBridge *)bridge;
@@ -13,6 +13,7 @@
NS_ASSUME_NONNULL_BEGIN
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTWrapperReactRootViewManager : RCTWrapperViewManager
@end
@@ -16,29 +16,29 @@
// Umbrella header with macros
// RCT_WRAPPER_FOR_VIEW
#define RCT_WRAPPER_FOR_VIEW(ClassName) \
\
NS_ASSUME_NONNULL_BEGIN \
\
@interface ClassName \
##Manager : RCTWrapperViewManager \
\
@end \
\
NS_ASSUME_NONNULL_END \
\
@implementation ClassName \
##Manager \
\
RCT_EXPORT_MODULE() \
\
- (UIView *)view \
{ \
RCTWrapperView *wrapperView = [super view]; \
wrapperView.contentView = [ClassName new]; \
return wrapperView; \
} \
\
#define RCT_WRAPPER_FOR_VIEW(ClassName) \
NS_ASSUME_NONNULL_BEGIN \
\
__attribute__((deprecated("This API will be removed along with the legacy architecture."))) \
@interface ClassName \
##Manager : RCTWrapperViewManager \
\
@end \
\
NS_ASSUME_NONNULL_END \
\
@implementation ClassName \
##Manager \
\
RCT_EXPORT_MODULE() \
\
- (UIView *)view \
{ \
RCTWrapperView *wrapperView = [super view]; \
wrapperView.contentView = [ClassName new]; \
return wrapperView; \
} \
\
@end
// RCT_WRAPPER_FOR_VIEW_CONTROLLER
@@ -46,6 +46,7 @@
\
NS_ASSUME_NONNULL_BEGIN \
\
__attribute__((deprecated("This API will be removed along with the legacy architecture."))) \
@interface ClassName \
##Manager : RCTWrapperViewManager \
\
@@ -15,6 +15,7 @@
NS_ASSUME_NONNULL_BEGIN
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTWrapperShadowView : RCTShadowView
- (instancetype)initWithBridge:(RCTBridge *)bridge NS_DESIGNATED_INITIALIZER;
@@ -9,12 +9,14 @@
#ifndef RCT_FIT_RM_OLD_COMPONENT
typedef CGSize (^RCTWrapperMeasureBlock)(CGSize minimumSize, CGSize maximumSize);
typedef CGSize (^RCTWrapperMeasureBlock)(CGSize minimumSize, CGSize maximumSize)
__attribute__((deprecated("This API will be removed along with the legacy architecture.")));
@class RCTBridge;
NS_ASSUME_NONNULL_BEGIN
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTWrapperView : UIView
@property (nonatomic, retain, nullable) UIView *contentView;
@@ -11,6 +11,7 @@
NS_ASSUME_NONNULL_BEGIN
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTWrapperViewControllerHostingView : UIView
@property (nonatomic, retain, nullable) UIViewController *contentViewController;
@@ -13,6 +13,7 @@
NS_ASSUME_NONNULL_BEGIN
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTWrapperViewManager : RCTViewManager
- (RCTWrapperView *)view NS_REQUIRES_SUPER;
@@ -9,6 +9,7 @@
#ifndef RCT_FIT_RM_OLD_COMPONENT
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTActivityIndicatorView : UIActivityIndicatorView
@end
@@ -9,6 +9,7 @@
#ifndef RCT_FIT_RM_OLD_COMPONENT
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTConvert (UIActivityIndicatorView)
+ (UIActivityIndicatorViewStyle)UIActivityIndicatorViewStyle:(id)json;
@@ -9,6 +9,7 @@
#ifndef RCT_FIT_RM_OLD_COMPONENT
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTDebuggingOverlayManager : RCTViewManager
@end
@@ -18,7 +18,8 @@
@protocol RCTModalHostViewInteractor;
@interface RCTModalHostView : UIView <RCTInvalidating, UIAdaptivePresentationControllerDelegate>
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTModalHostView : UIView<RCTInvalidating, UIAdaptivePresentationControllerDelegate>
@property (nonatomic, copy) NSString *animationType;
@property (nonatomic, assign) UIModalPresentationStyle presentationStyle;
@@ -9,6 +9,7 @@
#ifndef RCT_FIT_RM_OLD_COMPONENT
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTModalHostViewController : UIViewController
@property (nonatomic, copy) void (^boundsDidChangeBlock)(CGRect newBounds);
@@ -15,9 +15,11 @@ typedef void (^RCTModalViewInteractionBlock)(
UIViewController *reactViewController,
UIViewController *viewController,
BOOL animated,
dispatch_block_t completionBlock);
dispatch_block_t completionBlock)
__attribute__((deprecated("This API will be removed along with the legacy architecture.")));
@interface RCTModalHostViewManager : RCTViewManager <RCTInvalidating>
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTModalHostViewManager : RCTViewManager<RCTInvalidating>
/**
* `presentationBlock` and `dismissalBlock` allow you to control how a Modal interacts with your case,
@@ -12,7 +12,8 @@
#import <React/RCTBridgeModule.h>
#import <React/RCTEventEmitter.h>
@interface RCTModalManager : RCTEventEmitter <RCTBridgeModule>
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTModalManager : RCTEventEmitter<RCTBridgeModule>
- (void)modalDismissed:(NSNumber *)modalID;
@@ -8,6 +8,7 @@
#import <React/RCTShadowView.h>
#import <yoga/YGEnums.h>
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTRootShadowView : RCTShadowView
/**
@@ -11,6 +11,7 @@
#import <React/RCTComponent.h>
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTSwitch : UISwitch
@property (nonatomic, assign) BOOL wasOn;
@@ -9,6 +9,7 @@
#ifndef RCT_FIT_RM_OLD_COMPONENT
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTSwitchManager : RCTViewManager
@end
@@ -12,7 +12,8 @@
#import <React/RCTComponent.h>
#import <React/RCTScrollableProtocol.h>
@interface RCTRefreshControl : UIRefreshControl <RCTCustomRefreshControlProtocol>
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTRefreshControl : UIRefreshControl<RCTCustomRefreshControlProtocol>
@property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) RCTDirectEventBlock onRefresh;
@@ -9,6 +9,7 @@
#ifndef RCT_FIT_RM_OLD_COMPONENT
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTRefreshControlManager : RCTViewManager
@end
@@ -11,6 +11,7 @@
NS_ASSUME_NONNULL_BEGIN
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTSafeAreaShadowView : RCTShadowView
@end
@@ -15,6 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
@class RCTBridge;
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTSafeAreaView : RCTView
- (instancetype)initWithBridge:(RCTBridge *)bridge;
@@ -11,6 +11,7 @@
NS_ASSUME_NONNULL_BEGIN
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTSafeAreaViewLocalData : NSObject
- (instancetype)initWithInsets:(UIEdgeInsets)insets;
@@ -11,6 +11,7 @@
NS_ASSUME_NONNULL_BEGIN
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTSafeAreaViewManager : RCTViewManager
@end
@@ -11,6 +11,7 @@
#import <React/RCTShadowView.h>
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTScrollContentShadowView : RCTShadowView
@end
@@ -11,6 +11,7 @@
#import <React/RCTView.h>
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTScrollContentView : RCTView
@end
@@ -9,6 +9,7 @@
#ifndef RCT_FIT_RM_OLD_COMPONENT
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTScrollContentViewManager : RCTViewManager
@end
@@ -17,7 +17,8 @@
@protocol UIScrollViewDelegate;
@interface RCTScrollView : RCTView <UIScrollViewDelegate, RCTScrollableProtocol, RCTAutoInsetsProtocol>
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTScrollView : RCTView<UIScrollViewDelegate, RCTScrollableProtocol, RCTAutoInsetsProtocol>
- (instancetype)initWithEventDispatcher:(id<RCTEventDispatcherProtocol>)eventDispatcher NS_DESIGNATED_INITIALIZER;
@@ -10,12 +10,14 @@
#ifndef RCT_FIT_RM_OLD_COMPONENT
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTConvert (UIScrollView)
+ (UIScrollViewKeyboardDismissMode)UIScrollViewKeyboardDismissMode:(id)json;
@end
__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTScrollViewManager : RCTViewManager
@end