software-mansion-labs / react-native-turbo-demo

React Native Turbo - an open source library that can bring your turbo-enabled web application into the React Native world.
MIT License
101 stars 11 forks source link

VisitableView: introduce `webViewDebuggingEnabled` property #196

Closed pklatka closed 5 months ago

pklatka commented 5 months ago

Summary

This PR:

  1. Introduces webViewDebuggingEnabled property on VisitableView to enable the remote debugging using Safari / Chrome. Now remote debugging is disabled by default, but can be enabled by setting the property to true.
  2. Changes the place of calling the visit() function in RNVisitableView.swift. Now the visit() function is called in didSetProps to make sure that all props are being initialized. Without that change, somehow url didSet is called before sessionHandle which causes the WKWebView not to mount.

Test plan

Tested on iOS and Android using the example app.