Skip to content

Commit

Permalink
chore: further improve readme. include instructions for .env.
Browse files Browse the repository at this point in the history
  • Loading branch information
yusinto committed Dec 22, 2023
1 parent 597e439 commit eb61ced
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
17 changes: 16 additions & 1 deletion packages/sdk/react-native/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,25 @@ See the full [example app](https://github.com/launchdarkly/js-core/tree/main/pac

## Developing this SDK

1. Build all the code in the `js-core` repo:

```shell
# at js-core repo root
yarn && yarn build && cd packages/sdk/react-native/example
yarn && yarn build
```

2. The example app uses [react-native-dotenv](https://github.com/goatandsheep/react-native-dotenv)
to manage environment variables. Under `packages/sdk/react-native/example`
create an `.env` file and add your mobile key:

```shell
echo "MOBILE_KEY=mob-abc" >> packages/sdk/react-native/example/.env
```

3. Run the example app. This will link the local react-native sdk code to the
example app for development:

```shell
# in react-native/example
yarn && yarn ios-go
```
Expand Down
8 changes: 4 additions & 4 deletions packages/sdk/react-native/example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ MOBILE_KEY=abcdef12456

```shell
# Note for android, there's an issue with Flipper interfering with streaming connections
# so please run the release build. There's no such issue with ios.

# android
yarn && yarn android-release
# so please run the release build. There's no such issues with ios.

# ios
yarn && yarn ios-go

# android
yarn && yarn android-release
```

0 comments on commit eb61ced

Please sign in to comment.