Menu

  • Home
  • Javascript (JS)
  • Node JS
  • React JS
  • React Native
  • More
    • Electron JS
    • WordPress
    • About
    • Code Examples
  • Contact Us
  • Our Services
  • +237 673917344
  • info@alljavascript.net
  • New Content Weekly
Beyond JavaScript Beyond JavaScript
  • Home
  • Javascript (JS)
  • Node JS
  • React JS
  • React Native
  • More
    • Electron JS
    • WordPress
    • About
    • Code Examples
  • Contact Us
  • Our Services
How to run react native apps on physical device during development using wifi
  • October 20, 2022
  • admin
  • 0 Comments
  • 160 Views
  • 0 Likes
  • React Native

How to run react native apps on physical device during development using wifi

Frequent use of the USB cable method to run react native app on physical device at times can be annoying. Ohh What if you forgot your USB Cable!!

Hi there…In this post, you will quickly learn how to open your react native app in your android physical device using wifi or wireless network (not USB as usual).

The simple logic behind this is that your app will run by connecting to react native server via your IP address : port.
Note!: Keep your USB Cable connected until you’re done with the process and also ensure your android physical device and computer are connected on the same internet network. Lets get started. Follow the steps below;

  1. Install and open your react-native on physical device with USB cable using npm start and npx react-native run-android on different cmd terminals from your project directory.
    NB: More instructions can be found on react-native docs

2. With your app up and running on your android physical device, open a new terminal and run the command ipconfig to get your computer’s IP address (Ipv4 Address as seen below for my computer).

3. With the app open on your physical device, go the cmd (command line) window or terminal where you executed the command npm start (same as npx react-native start) and press the letter “d” on your keyboard to open developer menu on your android device (with the app open).

4. Press settings to open the settings screen and select Debug server host & port for device.

5. Next, we will add the IP address (add your own IP) and react native server port which will enable us to connect to the server and open the app / make changes without using a USB Cable.

Remember the metro bundler runs by default on port 8081.

Click ok, and it’s done.
Go back to your cmd window where metro bundler is open and press “d” on your keyboard to open the developer menu on your device. Finally, disconnect your USB Cable (leaving the developer menu screen open on your device), open the first command line window (the one with Welcome to Metro) and press the letter “r” on your keyboard to restart your app and see how it runs without the USB cable connected to your computer.

Hope it was helpful.

Drop your questions or comments if any.

Read also: Introduction to express middleware

Spread the love
Prev PostHTML Tags
Next PostProps react native example
Related Posts
  • Props react native example November 29, 2022

Leave a Comment Cancel Comment

Your email address will not be published. Required fields are marked *

Recent Posts

  • How to Make API Calls in Electron.js: A Step-by-Step Tutorial
  • How to Open and Read an Excel File in Node.js: A Step-by-Step Tutorial
  • Electron.js and Express.js backend: A Comprehensive Tutorial
  • How to Get Started with Electron.js: A Tutorial for Beginners
  • How to add Favicon in Express.js: A Step-by-Step Tutorial

Recent Comments

No comments to show.

Popular Posts

February 7, 2024 / Electron JS, Node JS
How to Make API Calls in Electron.js: A Step-by-Step Tutorial
February 7, 2024 / Javascript (JS), Node JS
How to Open and Read an Excel File in Node.js: A Step-by-Step Tutorial
February 7, 2024 / Electron JS, Javascript (JS)
Electron.js and Express.js backend: A Comprehensive Tutorial

Tags

Express Js Json Morgan Node JS NPM

Categories

  • Electron JS
  • Html, CSS
  • Javascript (JS)
  • MongoDB
  • Node JS
  • React Native

We are a community of developers aimed at teaching code and solving coding problems. We provide coding articles, opportunities, content, videos and tutorials to help developers around the world...

Our Services

  • Website Design
  • Domain and Web Hosting
  • Tutoring
  • Mobile Apps
  • Website Content Writing

Recent Posts

  • How to Make API Calls in Electron.j

    Feb 7, 2024

  • How to Open and Read an Excel File

    Feb 7, 2024

Useful Links

  • Home
  • Services
  • Blog #2
  • About Us
  • Contact Us
  • Request Tutorials
  • Jobs
  • Volunteer
  • Hire Us
  • Support
info@alljavascript.net Drop Us a Line
+237 673917344 Call Us Now
Africa Get Direction
Copyright 2022 alljavascript.net, All rights reserved.