shrutim
shrutim

Reputation: 1078

RCTDevSettings.setIsDebuggingRemotely(true) errors out with "undefined is not an object"

Using react native version 0.43.3, I am trying to enable the debug remotely option using the RCTDevSettings.

import {
   NativeModules
} from 'react-native'

and inside the MainComponent's componentDidMount, I made the call

NativeModules.RCTDevSettings.setIsDebuggingRemotely(true);

I get the following error

undefined is not an object (evaluating 'react_native_1.NativeModules.RCTDevSettings.setIsDebuggingRemotely')

What am I missing? I cannot use developer menu action sheet as I am inside an iMessage extension ( that does not support action sheet).

Upvotes: 0

Views: 730

Answers (2)

Naveen Vignesh
Naveen Vignesh

Reputation: 1357

It seems the NativeModules.DevMenu has been removed in the latest RN releases. We must for only rely on adb shell input keyevent 82 in case of android and Ctrl + D in case of iOS.

Upvotes: -1

jaws
jaws

Reputation: 2022

This seems to work: NativeModules.DevMenu.debugRemotely(true)

Upvotes: 1

Related Questions