bobmw
13760a1d45
|
8 months ago | |
---|---|---|
.expo | 2 years ago | |
.idea | 10 months ago | |
db | 3 years ago | |
src | 8 months ago | |
utils | 3 years ago | |
.gitignore | 4 years ago | |
LICENSE | 4 years ago | |
README.md | 10 months ago | |
package-lock.json | 3 years ago |
README.md
WPD-MobileApp
This project contains the components developed for a mobile app within the Waterproofing Data Project - WPD-WP6.
Tech stack
Folder Structure Convention
Folder structure options and naming conventions for this project
Directory layout
.
├── LICENSE # License description file
├── README.md # Readme description file
└── db # database files
└── src # source files
├── App.js # app initial file
├── app # app custom folders and files
│ ├── assets # assets folder (images and static)
│ ├── components # basic components folder
│ ├── config # common config files
│ ├── hooks # custom hooks
│ ├── navigation # navigation files and routes
│ └── screens # screen files
├── app.json
├── babel.config.js
├── package-lock.json
├── package.json
├── web-build
│ └── register-service-worker.js
└── yarn.lock
Setting up
$ git clone https://github.com/IGSD-UoW/WPD-MobileApp.git
$ cd WPD-MobileApp/src
$ npm install
Running
$ cd WPD-MobileApp/src
$ npm start
Running unit tests with Jest
$ cd WPD-MobileApp/src
$ npm run test
Run the app
To run the app locally, you need to install the Expo Go app on your mobile device and then scan the QR code that appears in the terminal after running the following command:
Ensure you have Yarn installed globally:
$ # on macOS
$ sudo yarn install
$
$ # on Linux
$ sudo apt update && sudo apt install yarn
Via Yarn, you can Expo CLI globally:
$ sudo yarn global add expo-cli
$
$ # It is possible that some extensions are needed
$ sudo yarn add expo-build-properties
Using Expo you can configure the app to run on a mobile OS. In this case Android:
$ eas build:configure
Run on Android Emulator
To run the app using expoon an Android emulator, you need to install the Android Studio and then run the following command:
$ cd WPD-MobileApp/src
$ npm run android
Build and publish the app
To build and publish the Android app, you have to run the following commands:
$ eas build -p android
This uses the EAS Build service to build the app. You can check the status of the build in the EAS Build dashboard.
Note that you might be asked to provide your Expo credentials. If you don't have an Expo account, you can create one by running the following command:
$ expo register