diff --git a/Examples/UIExplorer/UIExplorerUnitTests/RCTModuleInitNotificationRaceTests.m b/Examples/UIExplorer/UIExplorerUnitTests/RCTModuleInitNotificationRaceTests.m index 05d7370971..374b88a93a 100644 --- a/Examples/UIExplorer/UIExplorerUnitTests/RCTModuleInitNotificationRaceTests.m +++ b/Examples/UIExplorer/UIExplorerUnitTests/RCTModuleInitNotificationRaceTests.m @@ -45,7 +45,7 @@ RCT_EXPORT_MODULE() #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-implementations" -- (NSArray *)customDirectEventTypes +- (NSArray *)customBubblingEventTypes { return @[@"foo"]; } diff --git a/React/Views/RCTComponentData.m b/React/Views/RCTComponentData.m index 0b9d8414cc..0010cde1b7 100644 --- a/React/Views/RCTComponentData.m +++ b/React/Views/RCTComponentData.m @@ -395,17 +395,11 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init) - (NSDictionary *)viewConfig { + NSMutableArray *bubblingEvents = [NSMutableArray new]; + NSMutableArray *directEvents = [NSMutableArray new]; + #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" - NSMutableArray *directEvents = [NSMutableArray new]; - if (RCTClassOverridesInstanceMethod(_managerClass, @selector(customDirectEventTypes))) { - NSArray *events = [self.manager customDirectEventTypes]; - for (NSString *event in events) { - [directEvents addObject:RCTNormalizeInputEventName(event)]; - } - } - - NSMutableArray *bubblingEvents = [NSMutableArray new]; if (RCTClassOverridesInstanceMethod(_managerClass, @selector(customBubblingEventTypes))) { NSArray *events = [self.manager customBubblingEventTypes]; for (NSString *event in events) { @@ -444,12 +438,6 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init) free(methods); #if RCT_DEBUG - for (NSString *event in directEvents) { - if ([bubblingEvents containsObject:event]) { - RCTLogError(@"Component '%@' registered '%@' as both a bubbling event " - "and a direct event", _name, event); - } - } for (NSString *event in bubblingEvents) { if ([directEvents containsObject:event]) { RCTLogError(@"Component '%@' registered '%@' as both a bubbling event " diff --git a/React/Views/RCTViewManager.h b/React/Views/RCTViewManager.h index 568cd867ba..d4ff7192b1 100644 --- a/React/Views/RCTViewManager.h +++ b/React/Views/RCTViewManager.h @@ -63,19 +63,6 @@ typedef void (^RCTViewManagerUIBlock)(RCTUIManager *uiManager, NSDictionary *)customBubblingEventTypes __deprecated_msg("Use RCTBubblingEventBlock props instead."); -/** - * DEPRECATED: declare properties of type RCTDirectEventBlock instead - * - * Returns an array of names of events that can be sent by native views. This - * should return non-bubbling, directly-dispatched event types. The event name - * should not include a prefix such as 'on' or 'top', as this will be applied - * as needed. - * - * Note that this method is not inherited when you subclass a view module, and - * you should not call [super customDirectEventTypes] when overriding it. - */ -- (NSArray *)customDirectEventTypes __deprecated_msg("Use RCTDirectEventBlock props instead."); - /** * Called to notify manager that layout has finished, in case any calculated * properties need to be copied over from shadow view to view. diff --git a/React/Views/RCTViewManager.m b/React/Views/RCTViewManager.m index 794f1b1e41..e9448d9207 100644 --- a/React/Views/RCTViewManager.m +++ b/React/Views/RCTViewManager.m @@ -86,11 +86,6 @@ RCT_EXPORT_MODULE() ]; } -- (NSArray *)customDirectEventTypes -{ - return @[]; -} - - (RCTViewManagerUIBlock)uiBlockToAmendWithShadowView:(__unused RCTShadowView *)shadowView { return nil;