-
Notifications
You must be signed in to change notification settings - Fork 1
Running the app on your phone
In this article you will learn how to run the Rattle app on your phone in a development environment. Please make sure you have installed the Expo client on your mobile device:
Also, make sure you've setup the project.
When this wiki fails you, go here for more info.
Once you have installed both the Expo client on your mobile device, and setup the project, open your terminal and navigate to your project. Now start the app with:
npm start
This step may take a while. Refer to the package.json to see what scripts are available to you. The start
script will run expo start
.
Once this step is complete you should have a new tab automatically open in your browser to a localhost address. This is the Metro Bundler provided by the expo-cli. This is a localhost HTTP server that compiles the react-native project using Babel. In the bottom-left corner you will see a QR code with the following options above it: tunnel, LAN, and local. Select tunnel
.
Open the Expo client app you downloaded from the Google Play Store. Select the option to scan a QR code and point your camera at the Metro Bundler QR code. As soon as Expo reads the QR code you will notice both the Metro Bundler and your phone giving you messages "building JavaScript bundle" or "downloading JavaScript bundle" - this is good!
Open your phone Camera app and point it at the Metro Bundler QR code. You should receive a push notification from Expo. When you press the notification you will notice both the Metro Bundler and your phone giving you messages "building JavaScript bundle" or "downloading JavaScript bundle" - this is good!
Give it a moment and the app should appear on your phone! Because we selected tunnel
the app will have hot reloading to your phone, so you are also setup for development!
And head over to What the heck does it do?
©️ Rattld - A fake company with no shake