Skip to content
Closed
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
1 change: 1 addition & 0 deletions packages/react-native/Libraries/Image/RCTImageShadowView.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions packages/react-native/Libraries/Image/RCTImageView.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

NS_ASSUME_NONNULL_BEGIN

__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTBaseTextViewManager : RCTViewManager

@end
Expand Down
9 changes: 6 additions & 3 deletions packages/react-native/Libraries/Text/RCTTextAttributes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

NS_ASSUME_NONNULL_BEGIN

__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTRawTextViewManager : RCTViewManager

@end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions packages/react-native/Libraries/Text/Text/RCTTextView.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#import "RCTBaseTextViewManager.h"

__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTTextViewManager : RCTBaseTextViewManager

@end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

NS_ASSUME_NONNULL_BEGIN

__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTMultilineTextInputView : RCTBaseTextInputView

@end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

NS_ASSUME_NONNULL_BEGIN

__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTMultilineTextInputViewManager : RCTBaseTextInputViewManager

@end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

NS_ASSUME_NONNULL_BEGIN

__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTSinglelineTextInputView : RCTBaseTextInputView

@end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

NS_ASSUME_NONNULL_BEGIN

__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTSinglelineTextInputViewManager : RCTBaseTextInputViewManager

@end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

NS_ASSUME_NONNULL_BEGIN

__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTVirtualTextView : UIView

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

NS_ASSUME_NONNULL_BEGIN

__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTWrapperExampleView : UIView

@end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

NS_ASSUME_NONNULL_BEGIN

__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTWrapperExampleViewController : UIViewController

@end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

NS_ASSUME_NONNULL_BEGIN

__attribute__((deprecated("This API will be removed along with the legacy architecture.")))
@interface RCTWrapperReactRootViewManager : RCTWrapperViewManager

@end
Expand Down
47 changes: 24 additions & 23 deletions packages/react-native/Libraries/Wrapper/RCTWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,36 +16,37 @@
// 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
#define RCT_WRAPPER_FOR_VIEW_CONTROLLER(ClassName) \
\
NS_ASSUME_NONNULL_BEGIN \
\
__attribute__((deprecated("This API will be removed along with the legacy architecture."))) \
@interface ClassName \
##Manager : RCTWrapperViewManager \
\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion packages/react-native/Libraries/Wrapper/RCTWrapperView.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 4 additions & 2 deletions packages/react-native/React/Base/RCTBridge+Private.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ RCT_EXTERN void RCTRegisterModule(Class);
- (instancetype)initWithDelegate:(id<RCTBridgeDelegate>)delegate
bundleURL:(NSURL *)bundleURL
moduleProvider:(RCTBridgeModuleListProvider)block
launchOptions:(NSDictionary *)launchOptions NS_DESIGNATED_INITIALIZER;
launchOptions:(NSDictionary *)launchOptions NS_DESIGNATED_INITIALIZER
__deprecated_msg("This API will be removed along with the legacy architecture.");

#endif // RCT_FIT_RM_OLD_RUNTIME

Expand Down Expand Up @@ -150,7 +151,8 @@ RCT_EXTERN void RCTRegisterModule(Class);
@property (nonatomic, readonly) void *runtime;

#ifndef RCT_FIT_RM_OLD_RUNTIME
- (instancetype)initWithParentBridge:(RCTBridge *)bridge NS_DESIGNATED_INITIALIZER;
- (instancetype)initWithParentBridge:(RCTBridge *)bridge NS_DESIGNATED_INITIALIZER
__deprecated_msg("This API will be removed along with the legacy architecture.");
#endif // RCT_FIT_RM_OLD_RUNTIME

@end
7 changes: 5 additions & 2 deletions packages/react-native/React/Base/RCTBridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@ RCT_EXTERN_C_END
* pre-initialized module instances if they require additional init parameters
* or configuration.
*/
- (instancetype)initWithDelegate:(id<RCTBridgeDelegate>)delegate launchOptions:(NSDictionary *)launchOptions;
- (instancetype)initWithDelegate:(id<RCTBridgeDelegate>)delegate
launchOptions:(NSDictionary *)launchOptions
__deprecated_msg("This API will be removed along with the legacy architecture.");

/**
* DEPRECATED: Use initWithDelegate:launchOptions: instead
Expand All @@ -121,7 +123,8 @@ RCT_EXTERN_C_END
*/
- (instancetype)initWithBundleURL:(NSURL *)bundleURL
moduleProvider:(RCTBridgeModuleListProvider)block
launchOptions:(NSDictionary *)launchOptions;
launchOptions:(NSDictionary *)launchOptions
__deprecated_msg("This API will be removed along with the legacy architecture.");

/**
* This method is used to call functions in the JavaScript application context.
Expand Down
Loading
Loading