1// Copyright 2015-present 650 Industries. All rights reserved. 2 3#import <EXDevMenu/DevMenuRootView.h> 4 5#import <React/RCTAssert.h> 6#import <React/RCTRootContentView.h> 7#import <React/UIView+React.h> 8 9@implementation DevMenuRootView 10 11- (void)javaScriptDidLoad:(NSNotification *)notification 12{ 13 RCTAssertMainQueue(); 14 15 // Use the (batched) bridge that's sent in the notification payload, so the 16 // RCTRootContentView is scoped to the right bridge 17 RCTBridge *bridge = notification.userInfo[@"bridge"]; 18 RCTRootContentView *rootView = (RCTRootContentView *)self.contentView; 19 if (bridge != rootView.bridge) { 20 if (self.reactTag == rootView.reactTag) { 21 // Clear the reactTag so it can be re-assigned 22 self.reactTag = nil; 23 } 24 [super bundleFinishedLoading:bridge]; 25 } 26} 27 28- (void)bundleFinishedLoading:(RCTBridge *)bridge {} 29 30- (bool)becomeFirstResponder 31{ 32 // Avoid first responder status so that it won't hijack React Native keyboard commands. 33 return NO; 34} 35 36@end 37