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:
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
start:ios # Start the app on the iOS emulator
build:android # Build the Android app, without artifacts or code signing
build:ios # Build the iOS app, without artifacts or code signing
release:next:android # Release the next version of the app to the Play Store Beta
release:next:ios # Release the next version of the app to TestFlight
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 # Unit tests
types # TypeScript typechecking
script # Run a custom script using Jest
script:extract-translations # Extracts all i18next translations
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
.
For information on how this project is structured, please see the structure documentation.
fastlane
is automation tool for deployments for iOS and Android. We use this to sign code and bump versions for releases. To setup fastlane
locally you need to have ruby
installed.
- Install
Bundler
:gem install bundler
- Now install
fastlane
:bundle install
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.