2020-02-19 13:15:28 +00:00
# Description
This document provides information on how to start developing Status App.
# Getting Started
To start developing start a shell for platform you are interested in.
```
make shell TARGET=android
```
This step will take a while the first time as it will download all dependencies.
2020-04-14 11:09:59 +00:00
# Development
There are three steps necessary to start development, in this case for Android:
2022-10-05 13:39:28 +00:00
1. `make run-clojure` - Compiles Clojure into JavaScript, watches for changes on cljs files, and hot-reloads code in the app.
2. `make run-metro` - Starts metro bundler and watches JavaScript code.
3. `make run-android` or `make run-ios` - Builds the Android/iOS app and starts it on the device.
2020-04-14 11:09:59 +00:00
2020-05-14 11:58:05 +00:00
The first two will continue watching for changes and keep re-building the app. They need to be ready first.
2020-04-14 11:09:59 +00:00
The last one will exit once the app is up and ready.
2022-10-05 13:39:28 +00:00
## Simulators and Devices
### Android
You need to have an emulator like [AVD ](https://developer.android.com/studio/run/emulator ), or [Genymotion ](#genymotion-virtualization ), or a real device running and visible to [adb ](https://developer.android.com/studio/command-line/adb ), before you run `make run-android` .
### iOS
2023-06-15 18:07:11 +00:00
#### Running on a simulator
We highly recommend using the `iPhone 11 Pro` simulator as its screen dimensions match with our design.
If you have Xcode `v12.x` (and above) installed in your system, you need to follow the below steps to add `iPhone 11 Pro` simulator:
1. Open Xcode
2. Menu `>` Window `>` Devices and Simulators
3. Tap `+` button on bottom left
4. Select **Device Type** as `iPhone 11 Pro`
5. Leave the **Simulator Name** empty and tap on **Create**
##### NOTE ⚠️
Running `make run-ios` will target `iPhone 11 Pro` by default.
If you need to run on any other simulator, you can specify the simulator type by adding the `SIMULATOR` flag:
2022-10-05 13:39:28 +00:00
```sh
make run-ios SIMULATOR="iPhone 11 Pro"
```
2023-06-15 18:07:11 +00:00
#### Running on a physical device
Some manual steps are necessary for [developing on a physical iOS Device ](#physical-ios-device ).
2022-01-31 10:37:59 +00:00
# Build release
To build the app, your can simply run on of the following:
```
make release-android
make release-ios
```
For more `make` targets run `make help` .
2022-01-27 20:21:29 +00:00
# Updating Dependencies
* `make nix-update-pods` - iOS CocoaPods dependencies (updates `ios/Podfile` and `ios/Podfile.loc` )
* `make nix-update-gradle` - Android Gradle/Maven dependencies (updates `nix/deps/gradle/deps.json` )
* `make nix-update-clojure` - Clojure Maven dependencies (updates `nix/deps/clojure/deps.json` )
* `make nix-update-gems` - Fastlane Ruby dependencies (updates `fastlane/Gemfile.lock` and `fastlane/gemset.nix` )
2020-02-19 13:15:28 +00:00
# Manual Steps
There are a few manual steps you might want to do in order to start contributing.
## Genymotion Virtualization
Optionally set up Genymotion if you don't want to use Android Virtual Device:
https://www.genymotion.com
## Android Development Environment
You can also setup Android Development Environment + Simulator:
https://facebook.github.io/react-native/docs/getting-started.html
## Configure GitHub Account
The optimal way of pushing to GitHubis using SSH instead of user/pass auth.
It's recommented that you [add your public SSH key to your GitHub account ](https://help.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account ).
## Configure GPG Keys for signing commits
2022-07-17 12:37:46 +00:00
In order to increase security we require all commits in `status-mobile` repo to be signed with a GPG key.
2020-02-19 13:15:28 +00:00
Steps:
1. [Generate a new GPG key ](https://help.github.com/en/github/authenticating-to-github/generating-a-new-gpg-key )
2. [Setup Git to use your GPG key ](https://help.github.com/en/github/authenticating-to-github/telling-git-about-your-signing-key )
3. [Setup Git to sign commits ](https://help.github.com/en/github/authenticating-to-github/signing-commits )
4. [Setup GitHub to validate commits ](https://help.github.com/en/github/authenticating-to-github/adding-a-new-gpg-key-to-your-github-account )
2022-10-05 13:39:28 +00:00
## Physical iOS Device
To use a physical iPhone your device UDID must be added to provisioning profiles and your Apple account invited as Developer to Status team.
1. [Get your UDID of your iPhone. ](https://www.extentia.com/post/finding-the-udid-of-an-ios-device )
2. Request from someone with access like @cammellos or @jakubgs to
- Add the UDID to development devices on Apple Developer Portal.
- Invite your Apple account to be Developer in Status team.
3. Run a build in XCode using the project from `status-mobile/ios` directory.
- You might see error: `Select a development team in the Signing & Capabilities editor`
2022-11-21 12:11:26 +00:00
- Select `Status Research & Development GmbH` as the development team and rebuild again.
2022-10-05 13:39:28 +00:00
Once build finishes Status should start on your iPhone with its logs in terminal running `make run-metro` .