Remote debugging (React Native)
General information
React Native is an open-source framework for building multi-platform components or applications from a single codebase, where you can select a Device to build and install your Application. Mobitru Connect tool allows starting a connection to a real Device, accessible in the Device Manager and available for performing any allowed operation.
How to start
To use the real Device with the React Native, follow the steps:
- Install the React Native and all related tools according to your Platform.
More details can be found here. - For iOS only: install the Expo app on the Device before connecting via the Mobitru Connect.
It’s required due known issue with xcrun tool (more details can be found here). - Start a remote debug Session using the following instruction.
Build and install an Application
To build and install your Application using the React Native, follow the steps:
- Open the root project directory in the Console or the Terminal.
- Run the “yarn install” command to download and install all dependencies.
- The further flow will depend on what devices you are going to use:
- Run the “yarn start” command to start metro:
- Press “shift+a” to select the Android device:
- Wait for the Expo will be downloaded and installed to the Device:
- Wait for the Application will be assembled and opened in the Expo:
- Once the installation is complete, debugging options (like dev menu) will be available:
- Make sure that the Device session is active in Mobitru connect and the Expo app is installed:
- Run the “yarn start” command to start metro:
- Copy the connection URI:
- Open the Safari browser on the Device and try to open the URI:
- Press yes for switching to the Expo:
- Wait for the Application will be assembled and opened in the Expo:
- Performing actions in dev menu will be available only from the Device due issue with xcrun (mention it here):
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.