Thank you for your interest in participating!
There are many ways to contribute, beyond writing code or programming, by: logging bugs, reporting issues, and creating suggestions. To do so, please create a ticket in our issue tracker. See other ways to Contribute or give Feedback.
This document is for developers or programmers contributing to the source code of Mobile.
Table of Contents
If you wish to better understand how Mobile works or want to debug an issue: get the source, build it, and run it locally.
In order to download necessary tools, clone the repository, and install dependencies, you'll need network access.
You'll need the following:
- Git
- Node.JS (If you need to manage multiple Node.JS versions, use a node version manager to install)
Get the source code of mobile
repo:
gh repo fork shabados/mobile --clone=true
PROTIP: Use the gh
cli tool from GitHub to fork the repo to your GitHub account (if not already), clone it to your local machine, and set the appropriate remotes for origin and upstream with the above command.
For Android or iOS, you'll need the following:
Then according to your platform and target OS, follow the React Native CLI Quickstart to setup your dev environment.
NOTE: The React Native CLI is already bundled with the mobile
repo. If you need to manage multiple Node.JS versions, use a node version manager to install Node.JS instead of chocolatey like the Quickstart suggests. Use only jdk 8 and python2.
NOTE: If you're running Windows 10 and running Hyper-V, then you cannot be running HAXM at the same time. See Google's docs on emulator acceleration.
Run npm i
in the root directory. This will also install any macOS Cocoapods.
NOTE: For macOS a possible xcrun
error SDK "iphoneos" cannot be located
or unable to lookup item 'Path' in SDK 'iphoneos'
might be fixed with this github comment's solution.
Usage:
npm run <command>
The commands are:
start:android # Start the app on the Android emulator with tests in watch mode
start:ios # Start the app on iOS emulator with tests in watch mode
emulator:android # Start the Android emulator
emulator:ios # Start the iOS emulator
clean:android # Clean Android build files
clean:ios # Clean iOS build files
install-assets # Install any changed files in the "assets/" directory
lint # ESLint and checks code style
test # Typechecks + Unit + integration tests
NOTE: You will need to connect a device via USB or create an AVD to start the Android Emulator.
NOTE: If having issues starting the emulator, try cleaning your build files and running npm i
.
The workflow of development (or Git Flow) is to choose/create an issue to work on, create a feature branch, and submit a pull request.
PROTIP: Read more about our workflow (issue tracking, branching, and pull requests) in the How To Contribute wiki article.
Please see the wiki for Coding Guidelines (Names, Comments, Style, Linting, and Commit Messages).
To be used in commit messages.
Usage:
<type>(<scope>): <subject>
Until the project matures further, commit messages require no scopes.
Your contributions to open source, large or small, make great projects like this possible. Thank you for taking the time to participate in this project.