From ccfef7abf8cd7412451b046fc3fe758ffd020f66 Mon Sep 17 00:00:00 2001 From: Phillip Pan Date: Tue, 14 Nov 2023 13:28:15 -0800 Subject: [PATCH] hook up RCTDeprecation to [RCTBridgeModule bridge] (#41415) Summary: Changelog: [iOS][Deprecated] an example of RCT_DEPRECATION in action. you will get a build time warning if `RCT_DEPRECATED_DECLARATIONS` is enabled. Reviewed By: cipolleschi Differential Revision: D51184572 --- packages/react-native/React/Base/RCTBridgeModule.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/react-native/React/Base/RCTBridgeModule.h b/packages/react-native/React/Base/RCTBridgeModule.h index 15d871fa76a7cd..a43b0b4fccfe93 100644 --- a/packages/react-native/React/Base/RCTBridgeModule.h +++ b/packages/react-native/React/Base/RCTBridgeModule.h @@ -11,6 +11,8 @@ #import #import +#import + #import "RCTBundleManager.h" @class RCTBridge; @@ -146,7 +148,7 @@ RCT_EXTERN_C_END * To implement this in your module, just add `@synthesize bridge = _bridge;` * If using Swift, add `@objc var bridge: RCTBridge!` to your module. */ -@property (nonatomic, weak, readonly) RCTBridge *bridge; +@property (nonatomic, weak, readonly) RCTBridge *bridge RCT_DEPRECATED; /** * The queue that will be used to call all exported methods. If omitted, this