-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
45 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,58 @@ | ||
# Core X Mobile | ||
# Core Mobile | ||
|
||
## Setup dev environment | ||
|
||
Follow [these](https://reactnative.dev/docs/environment-setup) steps to setup dev environment; make sure to select | ||
**React Native CLI Quickstart** tab and select appropriate Development & Target OS. | ||
1. Set up React Native environment (https://reactnative.dev/docs/environment-setup) | ||
|
||
## Getting Started | ||
2. Run `yarn envs` to fetch and create all the necessary .env files | ||
|
||
### 1. Clone the repo. | ||
3. Run `yarn install && yarn setup` if you haven't | ||
|
||
```zsh | ||
git clone [email protected]:ava-labs/avalanche-wallet-apps.git | ||
cd avalanche-wallet-apps/ | ||
``` | ||
|
||
**NOTE:** If you're using IDE to initiate this action you will need `github access token` registered with Jumpcloud SSO. | ||
To do that, go to https://github.com/settings/tokens, generate access token and authorize it with Jumpcloud. Finally, import that token to your favorite IDE. | ||
|
||
### 2. Setup environment. | ||
1. To access all project's dependencies you will need to generate an `NPM token` from your npmjs account and add that as an environment variable named `NPM_TOKEN` on your mac (for example, `.zshenv` if using zsh or `.bash_profile` if not). | ||
2. Create a `.env.development` file in the root of the project. The contents of the .env file is in 1Password. Ask permission to access it (the vault name is Mobile team). Once access is given copy and paste the contents from the 1Password Secure Note into your local .env file. | ||
3. Download `keystore.properties` from 1Password and place it in the `android` folder | ||
|
||
**IMPORTANT:** the `.env` files are never to be committed to the repo, and are already added to .gitignore. | ||
## Build the app | ||
|
||
#### For iOS | ||
|
||
### 3. Install the dependencies. | ||
1. Install iOS dependencies: | ||
|
||
```zsh | ||
yarn setup | ||
``` | ||
```zsh | ||
yarn podInstall | ||
``` | ||
|
||
### 4. Launch the app | ||
2. Launch iOS simulator and build | ||
|
||
#### For iOS | ||
```zsh | ||
yarn ios | ||
``` | ||
|
||
First install iOS dependencies: | ||
```zsh | ||
yarn podInstall | ||
``` | ||
#### For Android | ||
|
||
Now you can run the app | ||
Launch android emulator and build | ||
|
||
```zsh | ||
# launch iOS simulator and start the app | ||
yarn ios | ||
yarn android | ||
``` | ||
|
||
**Note:** if you run into `"Your session has expired. Please log in."` issue, go to `XCode > Preferences > Accounts` and sign in with your account. | ||
## Common commands | ||
|
||
#### For Android | ||
```zsh | ||
# launch android emulator and start the app | ||
yarn android | ||
``` | ||
# run unit tests | ||
yarn test | ||
|
||
## Tests | ||
# run typescript check | ||
yarn tsc | ||
|
||
You can run the test suite with | ||
# run lint check | ||
yarn lint | ||
|
||
```zsh | ||
yarn test | ||
# fetch envs from aws and populate .env files | ||
# do this when you first set up the project and whenever you need to sync the .env files | ||
yarn envs | ||
``` | ||
|
||
## Custom fonts | ||
|
||
To add custom font, add it to src/assets folder and then run: | ||
To add custom fonts, add it to app/assets/fonts folder and then run: | ||
|
||
```zsh | ||
yarn link | ||
``` | ||
|
@@ -79,30 +66,9 @@ https://whimsical.com/mobile-navigation-system-4WaXLt2DgAutCmbfFF6wpS | |
https://whimsical.com/wallet-connect-flows-9QqTTDNdktBePx6vDR9oeX | ||
|
||
## App Signing | ||
|
||
[Documentation](docs/app_signing.md) | ||
|
||
## Release Process | ||
[Documentation](docs/release_process.md) | ||
|
||
## Known issues | ||
### Apple M1 chips | ||
|
||
Exclude arch `arm64` | ||
|
||
Prefix all comands with `arch -x86_64` | ||
|
||
Examples: | ||
```zsh | ||
arch -x86_64 pod install | ||
``` | ||
|
||
```zsh | ||
arch -x86_64 yarn ios | ||
``` | ||
|
||
### `pod install` fails on Apple M1 chips | ||
|
||
Install ffi | ||
```zsh | ||
sudo arch -x86_64 gem install ffi | ||
``` | ||
[Documentation](docs/release_process.md) |