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: 0 additions & 1 deletion packages/react-native/Libraries/Blob/RCTBlobManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/

#import <React/RCTBridge.h>
#import <React/RCTBridgeModule.h>
#import <React/RCTInitializing.h>
#import <React/RCTURLRequestHandler.h>
Expand Down
1 change: 0 additions & 1 deletion packages/react-native/Libraries/Blob/RCTBlobManager.mm
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ @implementation RCTBlobManager {

RCT_EXPORT_MODULE(BlobModule)

@synthesize bridge = _bridge;
@synthesize moduleRegistry = _moduleRegistry;
@synthesize methodQueue = _methodQueue;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#import <React/RCTFileReaderModule.h>

#import <FBReactNativeSpec/FBReactNativeSpec.h>
#import <React/RCTBridge.h>
#import <React/RCTConvert.h>

#import <React/RCTBlobManager.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#import <UIKit/UIKit.h>

#import <React/RCTBridge.h>
#import <React/RCTBridgeModule.h>
#import <React/RCTImageURLLoader.h>
#import <React/RCTResizeMode.h>
#import <React/RCTURLRequestHandler.h>
Expand Down
19 changes: 4 additions & 15 deletions packages/react-native/Libraries/Image/RCTImageLoader.mm
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ @implementation RCTImageLoader {
__weak id<RCTImageRedirectProtocol> _redirectDelegate;
}

@synthesize bridge = _bridge;
@synthesize moduleRegistry = _moduleRegistry;
@synthesize maxConcurrentLoadingTasks = _maxConcurrentLoadingTasks;
@synthesize maxConcurrentDecodingTasks = _maxConcurrentDecodingTasks;
Expand Down Expand Up @@ -134,13 +133,8 @@ - (void)setUp

_URLRequestQueue = dispatch_queue_create("com.facebook.react.ImageLoaderURLRequestQueue", DISPATCH_QUEUE_SERIAL);

// Get loaders, sorted in reverse priority order (highest priority first)
if (_loadersProvider != nil) {
_loaders = _loadersProvider(self.moduleRegistry);
} else {
RCTAssert(_bridge, @"Trying to find RCTImageURLLoaders and bridge not set.");
_loaders = [_bridge modulesConformingToProtocol:@protocol(RCTImageURLLoader)];
}
RCTAssert(_loadersProvider != nil, @"Trying to find RCTImageURLLoaders and loaders provider not set.");
_loaders = _loadersProvider(self.moduleRegistry);
_loaders =
[_loaders sortedArrayUsingComparator:^NSComparisonResult(id<RCTImageURLLoader> a, id<RCTImageURLLoader> b) {
float priorityA = [a respondsToSelector:@selector(loaderPriority)] ? [a loaderPriority] : 0;
Expand All @@ -154,13 +148,8 @@ - (void)setUp
}
}];

// Get decoders, sorted in reverse priority order (highest priority first)
if (_decodersProvider != nil) {
_decoders = _decodersProvider(self.moduleRegistry);
} else {
RCTAssert(_bridge, @"Trying to find RCTImageDataDecoders and bridge not set.");
_decoders = [_bridge modulesConformingToProtocol:@protocol(RCTImageDataDecoder)];
}
RCTAssert(_decodersProvider != nil, @"Trying to find RCTImageDataDecoders and decoders provider not set.");
_decoders = _decodersProvider(self.moduleRegistry);
_decoders = [_decoders
sortedArrayUsingComparator:^NSComparisonResult(id<RCTImageDataDecoder> a, id<RCTImageDataDecoder> b) {
float priorityA = [a respondsToSelector:@selector(decoderPriority)] ? [a decoderPriority] : 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#import <UIKit/UIKit.h>

#import <React/RCTBridge.h>
#import <React/RCTImageCache.h>
#import <React/RCTImageDataDecoder.h>
#import <React/RCTImageURLLoader.h>
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native/Libraries/Image/RCTImageURLLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#import <UIKit/UIKit.h>

#import <React/RCTBridge.h>
#import <React/RCTBridgeModule.h>
#import <React/RCTResizeMode.h>

NS_ASSUME_NONNULL_BEGIN
Expand Down
5 changes: 2 additions & 3 deletions packages/react-native/Libraries/Network/RCTNetworking.mm
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,8 @@ - (void)invalidate
return _handlers;
}

NSArray<id<RCTURLRequestHandler>> *newHandlers = _handlersProvider
? _handlersProvider(self.moduleRegistry)
: [self.bridge modulesConformingToProtocol:@protocol(RCTURLRequestHandler)];
RCTAssert(_handlersProvider != nil, @"Trying to find RCTURLRequestHandlers and handlers provider not set.");
NSArray<id<RCTURLRequestHandler>> *newHandlers = _handlersProvider(self.moduleRegistry);

// Get handlers, sorted in reverse priority order (highest priority first)
newHandlers = [newHandlers
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#import <UserNotifications/UserNotifications.h>

#import <FBReactNativeSpec/FBReactNativeSpec.h>
#import <React/RCTBridge.h>
#import <React/RCTConvert.h>
#import <React/RCTUtils.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#import <React/RCTSettingsManager.h>

#import <FBReactNativeSpec/FBReactNativeSpec.h>
#import <React/RCTBridge.h>
#import <React/RCTConvert.h>
#import <React/RCTEventDispatcherProtocol.h>
#import <React/RCTUtils.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#import <UIKit/UIKit.h>

#import <React/RCTBridge.h>
#import <React/RCTBridgeModule.h>

@interface RCTActionSheetManager : NSObject <RCTBridgeModule>

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

#if !TARGET_OS_TV

#import <React/RCTBridge.h>
#import <React/RCTConvert.h>
#import <React/RCTLog.h>
#import <React/RCTUIManager.h>
Expand Down
1 change: 0 additions & 1 deletion packages/react-native/React/CoreModules/RCTAppState.mm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

#import <FBReactNativeSpec/FBReactNativeSpec.h>
#import <React/RCTAssert.h>
#import <React/RCTBridge.h>
#import <React/RCTEventDispatcherProtocol.h>
#import <React/RCTInitializing.h>
#import <React/RCTUtils.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

#import <FBReactNativeSpec/FBReactNativeSpec.h>
#import <React/RCTAppearance.h>
#import <React/RCTBridge.h>
#import <React/RCTConstants.h>
#import <React/RCTConvert.h>
#import <React/RCTDefines.h>
Expand Down
1 change: 0 additions & 1 deletion packages/react-native/React/CoreModules/RCTDevMenu.mm
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ @implementation RCTDevMenu {
NSMutableArray<RCTDevMenuItem *> *_extraMenuItems;
}

@synthesize bridge = _bridge;
@synthesize moduleRegistry = _moduleRegistry;
@synthesize callableJSModules = _callableJSModules;
@synthesize bundleManager = _bundleManager;
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native/React/CoreModules/RCTDeviceInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#import <UIKit/UIKit.h>

#import <React/RCTBridge.h>
#import <React/RCTBridgeModule.h>

@interface RCTDeviceInfo : NSObject <RCTBridgeModule>

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

#import <UIKit/UIKit.h>

#import <React/RCTBridge.h>
#import <React/RCTEventDispatcherProtocol.h>
#import <React/RCTInitializing.h>
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ @implementation RCTEventDispatcher {
NSRecursiveLock *_observersLock;
}

@synthesize bridge = _bridge;
@synthesize dispatchToJSThread = _dispatchToJSThread;
@synthesize callableJSModules = _callableJSModules;

Expand Down Expand Up @@ -175,13 +174,7 @@ - (void)sendEvent:(id<RCTEvent>)event
[_eventQueueLock unlock];

if (scheduleEventsDispatch) {
if (_bridge != nullptr) {
[_bridge
dispatchBlock:^{
[self flushEventsQueue];
}
queue:RCTJSThread];
} else if (_dispatchToJSThread != nullptr) {
if (_dispatchToJSThread != nullptr) {
_dispatchToJSThread(^{
[self flushEventsQueue];
});
Expand Down
1 change: 1 addition & 0 deletions packages/react-native/React/CoreModules/RCTLogBox.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* LICENSE file in the root directory of this source tree.
*/

#import <React/RCTDefines.h>
#import <UIKit/UIKit.h>
#import "RCTLogBoxView.h"

Expand Down
4 changes: 1 addition & 3 deletions packages/react-native/React/CoreModules/RCTLogBox.mm
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
#import "RCTLogBox.h"

#import <FBReactNativeSpec/FBReactNativeSpec.h>
#import <React/RCTBridge.h>
#import <React/RCTBridgeModule.h>
#import <React/RCTDefines.h>
#import <React/RCTLog.h>
#import <React/RCTRedBoxSetEnabled.h>
#import <React/RCTSurface.h>
Expand All @@ -25,8 +25,6 @@ @implementation RCTLogBox {
__weak id<RCTSurfacePresenterStub> _bridgelessSurfacePresenter;
}

@synthesize bridge = _bridge;

RCT_EXPORT_MODULE()

+ (BOOL)requiresMainQueueSetup
Expand Down
1 change: 0 additions & 1 deletion packages/react-native/React/CoreModules/RCTLogBoxView.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/

#import <React/RCTBridge.h>
#import <React/RCTSurfacePresenterStub.h>
#import <React/RCTSurfaceView.h>
#import <UIKit/UIKit.h>
Expand Down
1 change: 0 additions & 1 deletion packages/react-native/React/CoreModules/RCTRedBox.mm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ @implementation RCTRedBox {
NSMutableArray<RCTRedBoxButtonPressHandler> *_customButtonHandlers;
}

@synthesize bridge = _bridge;
@synthesize moduleRegistry = _moduleRegistry;
@synthesize bundleManager = _bundleManager;

Expand Down
1 change: 0 additions & 1 deletion packages/react-native/React/Views/RCTViewManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ - (void)updateAccessibilityTraitsForRole:(RCTView *)view withDefaultView:(RCTVie
RCT_CUSTOM_VIEW_PROPERTY(nativeID, NSString *, RCTView)
{
view.nativeID = json ? [RCTConvert NSString:json] : defaultView.nativeID;
[_bridge.uiManager setNativeID:view.nativeID forView:view];
}

RCT_CUSTOM_VIEW_PROPERTY(pointerEvents, RCTPointerEvents, RCTView)
Expand Down
21 changes: 5 additions & 16 deletions packages/rn-tester/RCTTest/RCTTestModule.mm
Original file line number Diff line number Diff line change
Expand Up @@ -90,26 +90,16 @@ @implementation RCTTestModule {
NSMutableDictionary<NSString *, NSNumber *> *_snapshotCounter;
}

@synthesize bridge = _bridge;
@synthesize moduleRegistry = _moduleRegistry;
@synthesize viewRegistry_DEPRECATED = _viewRegistry_DEPRECATED;

RCT_EXPORT_MODULE()

- (dispatch_queue_t)methodQueue
{
return _bridge.uiManager.methodQueue;
}

- (void)setMethodQueue:(dispatch_queue_t)methodQueue
{
// noop
}

- (void)verifySnapshot:(RCTResponseSenderBlock)callback
{
RCTAssert(_controller != nil, @"No snapshot controller configured.");

[_bridge.uiManager addUIBlock:^(RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
[_viewRegistry_DEPRECATED addUIBlock:^(__unused RCTViewRegistry *viewRegistry) {
NSString *testName = NSStringFromSelector(self->_testSelector);
if (!self->_snapshotCounter) {
self->_snapshotCounter = [NSMutableDictionary new];
Expand Down Expand Up @@ -163,10 +153,9 @@ - (void)markTestCompleted

- (void)markTestPassed:(BOOL)success
{
[_bridge.uiManager
addUIBlock:^(__unused RCTUIManager *uiManager, __unused NSDictionary<NSNumber *, UIView *> *viewRegistry) {
self->_status = success ? RCTTestStatusPassed : RCTTestStatusFailed;
}];
[_viewRegistry_DEPRECATED addUIBlock:^(__unused RCTViewRegistry *viewRegistry) {
self->_status = success ? RCTTestStatusPassed : RCTTestStatusFailed;
}];
}

- (std::shared_ptr<facebook::react::TurboModule>)getTurboModule:
Expand Down
Loading