Deprecate RCTImageLoader category of RCTBridge [2/N]

Summary: We no longer want to access RCTImageLoader from the bridge.

Reviewed By: shergin

Differential Revision: D16389383

fbshipit-source-id: 8e006bf0e2e2651f3ac036c09e589213ac9d29f9
This commit is contained in:
Peter Argany
2019-07-24 10:51:13 -07:00
committed by Facebook Github Bot
parent e9af5726c5
commit 8a80d613f5
2 changed files with 10 additions and 3 deletions
+4 -3
View File
@@ -155,11 +155,12 @@ typedef dispatch_block_t RCTImageLoaderCancellationBlock;
@end
/**
* DEPRECATED!! DO NOT USE
* Instead use `[_bridge moduleForClass:[RCTImageLoader class]]`
*/
@interface RCTBridge (RCTImageLoader)
/**
* The shared image loader instance
*/
@property (nonatomic, readonly) RCTImageLoader *imageLoader;
@end
+6
View File
@@ -936,10 +936,16 @@ static UIImage *RCTResizeImageIfNeeded(UIImage *image,
@end
/**
* DEPRECATED!! DO NOT USE
* Instead use `[_bridge moduleForClass:[RCTImageLoader class]]`
*/
@implementation RCTBridge (RCTImageLoader)
- (RCTImageLoader *)imageLoader
{
RCTLogWarn(@"Calling bridge.imageLoader is deprecated and will not work in newer versions of RN. Please update to the"
"moduleForClass API or turboModuleLookupDelegate API.");
return [self moduleForClass:[RCTImageLoader class]];
}