Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
atn4z7 committed Feb 23, 2024
1 parent 2adb52c commit 1551b5f
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 73 deletions.
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ Ava Labs Mobile

This repository is a monorepo that we manage using [Yarn workspaces](https://yarnpkg.com/features/workspaces).

| Package | Description |
| :--- | :--- |
| [@avalabs/core-mobile](https://github.com/ava-labs/avalanche-wallet-apps/tree/develop/packages/core-mobile) | Core Mobile app |
| [@avalabs/k2-mobile](https://github.com/ava-labs/avalanche-wallet-apps/tree/develop/packages/k2-mobile) | Mobile Design System (under 🚧👷‍♂️🚧) |
| [eslint-plugin-avalabs-mobile](https://github.com/ava-labs/avalanche-wallet-apps/tree/develop/packages/eslint-mobile) | Shared Eslint plugin |
| [@avalabs/tsconfig-mobile](https://github.com/ava-labs/avalanche-wallet-apps/tree/develop/packages/tsconfig-mobile) | Shared Typescript config |
| Package | Description |
| :-------------------------------------------------------------------------------------------------------------------- | :---------------------------------- |
| [@avalabs/core-mobile](https://github.com/ava-labs/avalanche-wallet-apps/tree/develop/packages/core-mobile) | Core Mobile app |
| [@avalabs/k2-mobile](https://github.com/ava-labs/avalanche-wallet-apps/tree/develop/packages/k2-mobile) | Mobile Design System (under 🚧👷‍♂️🚧) |
| [eslint-plugin-avalabs-mobile](https://github.com/ava-labs/avalanche-wallet-apps/tree/develop/packages/eslint-mobile) | Shared Eslint plugin |
| [@avalabs/tsconfig-mobile](https://github.com/ava-labs/avalanche-wallet-apps/tree/develop/packages/tsconfig-mobile) | Shared Typescript config |

## ⚡ Quickstart

Expand All @@ -25,12 +25,18 @@ This repository is a monorepo that we manage using [Yarn workspaces](https://yar
```
brew install yarn
```
4. Install required dependencies for all packages
3. Set up `$NPM_TOKEN`

To install all dependencies, you will need to generate an `NPM token` from your NPM.js account and add that as an environment variable named `NPM_TOKEN` on your machine (for example, `.zshenv` if using zsh or `.bash_profile` if not).

4. Install dependencies for all packages

In the root directory, run:

```
yarn install && yarn setup
```

5. Follow the specific instructions in each package to build/run it

## 📖 Tips
Expand All @@ -47,4 +53,4 @@ This repository is a monorepo that we manage using [Yarn workspaces](https://yar
2. To quickly remove all the node_modules folders, you can run
```
./scripts/remove-node-modules.sh
```
```
96 changes: 31 additions & 65 deletions packages/core-mobile/README.md
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
```
Expand All @@ -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)

0 comments on commit 1551b5f

Please sign in to comment.