Closed jamonholmgren closed 5 years ago
It might be cool if we provided a script to quickly open that. Similar to Ray’s https://github.com/rhdeck/react-native-xcode
Looks like you just need to add:
"rnpm": {
"plugin": "plugin.js"
}
To the package.json to add scripts to react-native-cli.
Something like react-native webview-debug
?
Yeah exactly. Not sure if we have a similar capability for Android or not. I would have to investigate.
Love that idea.
Oh on android there's a line to add in your MainApplication.java and you can then debug using remote devices in chrome.
import android.webkit.WebView;
@Override
public void onCreate() {
super.onCreate();
...
WebView.setWebContentsDebuggingEnabled(true);
SoLoader.init(this, /* native exopackage */ false);
}
@Titozzz after put that, how to get console out, bro?
I'm looking for a similar way to do that in iOS, like android but I cannot find it :/
We should document how to use Safari to debug the webview's JavaScript as described here:
https://stackoverflow.com/a/20233054