Skip to content

Mobile Development Setup

Ryan Martin edited this page Mar 4, 2020 · 3 revisions

This page includes all you need to know to get started with mobile development

The stack

This app is built with React-Native. React native apps are written with Javascript but compiled to mobile platforms native languages such as swift/objective-c/Java so the app performs as if it were written in these languages. React Native is very similar to React for the web, so if you know one it's easy to pick up the other.

This app communicates with our server via HTTP requests. The API is documented nowhere yet

To set up dev environment:

  1. Install git if you don't already have it. 1a. If you are new to git, you can start out with the UI version instead of using the command line. However, the UI has limited functionality and you will have to eventually learn the command line interface.
  2. Install node
  3. Install Expo CLI
  4. Fork the repo to your own Github
  5. Clone this repository with git clone http://github.com/YourGithubUserID/skybunk-mobile.git
  6. cd into the folder and run npm install

To test the app

  1. Install expo on your mobile device via your app store
  2. run expo start. On Eduroam, run expo start --tunnel to get around network restrictions.
  3. Scan the barcode with expo (android only) or text/email the link to your phone

Architecture

Full views are placed in views folder, reusable components are placed in components folder. The entry point is App.js and we are using react-navigation to handle app flow (navigation)

Useful commands

Command Description
npm test Run the test suite
npm run code-format Runs eslint and prettier, auto-correcting issues
npm run code-format-check Runs eslint and prettier, checking for errors without auto-correcting them

This project was bootstrapped with Create React Native App. Here is a guide of common tasks for a CRNA project

Clone this wiki locally