@@ -2,44 +2,11 @@ import Foundation
22import React
33
44public class DevHelper {
5-
6- public static func showAppMenu( ) {
7- devMenu? . show ( )
8- }
9-
10- public static func toggleElementInspector( ) {
11- devSettings? . toggleElementInspector ( )
12- }
13-
14- // Modern Architecture: Access dev modules through ReactAppProvider's moduleRegistry
15- // Works with RN 0.83+ where RCTBridge.current() returns nil
16- public static var devSettings : RCTDevSettings ? {
17- return ReactAppProvider . getModule ( name: RCTDevSettings . moduleName ( ) , type: RCTDevSettings . self)
18- }
19-
20- public static var devMenu : RCTDevMenu ? {
21- return ReactAppProvider . getModule ( name: RCTDevSettings . moduleName ( ) , type: RCTDevMenu . self)
22- }
23-
245 public static func setDebugMode( enabled: Bool ) {
256 AppPreferences . remoteDebuggingEnabled = enabled
26-
27- // Modern Architecture (RN 0.83+):
28- // Debug operations are controlled from JavaScript via the DevSettings TurboModule.
29- // Native code no longer needs to control debugging - it's all JavaScript-driven.
30- //
31- // To open the debugger from JavaScript:
32- // import { DevSettings } from 'mendix-native';
33- // DevSettings.openDebugger();
34- //
35- // This method now only stores the preference. Actual debug control is via JavaScript.
367 }
37-
38- public static func hideDevLoadingView( ) {
39- devLoadingView? . hide ( )
40- }
41-
42- public static var devLoadingView : RCTDevLoadingView ? {
43- return ReactAppProvider . getModule ( name: RCTDevSettings . moduleName ( ) , type: RCTDevLoadingView . self)
8+
9+ public static func setShakeToShowDevMenuEnabled( enabled: Bool ) {
10+ ReactHostHelper ( ) . emitEvent ( " mendixSetShakeToShowDevMenu " , payload: enabled)
4411 }
4512}
0 commit comments