1 // Copyright 2022-present 650 Industries. All rights reserved. 2 3 import ExpoModulesCore 4 5 public class ExpoDevMenuReactDelegateHandler: ExpoReactDelegateHandler { 6 public static var shouldEnableAutoSetup: Bool = { 7 if !EXAppDefines.APP_DEBUG { 8 return false 9 } 10 return true 11 }() 12 13 public override func createRootView(reactDelegate: ExpoReactDelegate, bridge: RCTBridge, moduleName: String, initialProperties: [AnyHashable : Any]?) -> RCTRootView? { 14 if ExpoDevMenuReactDelegateHandler.shouldEnableAutoSetup { 15 DevMenuManager.shared.currentBridge = bridge 16 } 17 return nil 18 } 19 } 20