From 9b1f8a81e9af971af6ddc1dc4ef96302bf4a08d7 Mon Sep 17 00:00:00 2001 From: Phillip Pan Date: Sat, 18 Nov 2023 22:13:40 -0800 Subject: [PATCH] hook up RCTDeprecation to [RCTBridgeModule bridge] (#41415) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/41415 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 fbshipit-source-id: a0bcb4c69e63620bbdf2e2a7afb25c649fcaa100 --- 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 15d871fa76a..a43b0b4fccf 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