Development Setup - GrasspIt/GrasspReactNativeDriverApp GitHub Wiki

Running the App

After cloning the repository and installing the dependencies from package.json, you are ready to run the app.

To start the app, open the project and run npm start in your terminal. A browser window will open with the name of the app in the tab.

Opening the App on a Phone

Because this app is managed using Expo-cli, it is not necessary to have Xcode or Android Studio installed to run it. All you need is a recent version of Node.js and a mobile device with the Expo app.

The advantage to using a real device instead of a simulator/emulator for this app is the use of push notifications and location tracking.

Make sure your device is on the same wireless network as your computer. You may either send yourself an email link to open it on your phone or scan the QR code on the screen.

Opening the App on a Simulator or Emulator

If you have Xcode or Android Studio, you may run the app on whatever simulators and emulators you have set up. The advantage to this is seeing what the app's UI looks like on many different devices.

If you have a simulator set up through Xcode, simply click Run on iOS simulator to open the app on a simulator. For Android, first select and open an emulator before clicking Run on android emulator.

React Native Debugger

Once the app is running, you can open the developer tools menu by shaking your mobile device, pressing cmd+d for an iOS simulator, or cmd+m for an Android emulator. Select Debug Remote JS from the developer menu to open a debugger.

If you have no other debugger running, the default React Native Debugger will open in a new browser window. Open the console to see logs and network calls as you would in a web app.

If you want a debugger using Redux Dev Tools, install and open React Native Debugger following these instructions. Be sure to right-click in the debugger and select enable network inspect if you wish to view network calls.