Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflow-templates/e2e-template.properties.json

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflow-templates/e2e-template.yaml

This file was deleted.

11 changes: 7 additions & 4 deletions .github/workflows/release-android-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ on:
required: false
default: false
type: boolean
secrets:
firebase-app-id:
description: "Firebase App ID for distribution"
required: true
type: string
secrets:
gsa-key:
required: true
sentry-file:
Expand Down Expand Up @@ -119,12 +121,13 @@ jobs:
- name: Add Keystore file
run: echo ${{ secrets.keystore }} | base64 --decode >> ${{ inputs.root-path }}/android/app/${{ secrets.keystore-name }}.keystore

# Add Google Services file -> to create it run: base64 -i path/to/GoogleService-Info.plist
# Add Google Services file (base64 encoded)
# To encode: base64 -i path/to/google-services.json | pbcopy
- name: Add Google Services file
env:
google-services-file: ${{ secrets.google-services-file }}
if: ${{ env.google-services-file != '' }}
run: echo ${{ env.google-services-file }} | base64 --decode >> ${{ inputs.root-path }}/android/app/google-services.json
run: echo "${{ secrets.google-services-file }}" | base64 --decode > ${{ inputs.root-path }}/android/app/google-services.json

- name: Optimize Gradle for CI
run: |
Expand Down Expand Up @@ -162,7 +165,7 @@ jobs:
id: firebase-upload
continue-on-error: false
env:
APP_ID: ${{ secrets.firebase-app-id }}
APP_ID: ${{ inputs.firebase-app-id }}
run: |
firebase appdistribution:distribute ${{ inputs.output-path }} \
--app $APP_ID \
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/release-appkit.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Release AppKit
run-name: "AppKit - ${{ inputs.platform == 'ios' && '🍎 iOS' || '🤖 Android' }} (${{ inputs.release-type }})"

permissions:
id-token: write
Expand Down Expand Up @@ -38,13 +39,13 @@ jobs:
project-type: 'dapp'
output-path: ${{ inputs.release-type == 'internal' && 'dapps/W3MWagmi/android/app/build/outputs/apk/internal/app-internal.apk' || 'dapps/W3MWagmi/android/app/build/outputs/apk/release/app-release.apk' }}
upload-to-bucket: ${{ inputs.e2e-build }}
firebase-app-id: ${{ inputs.release-type == 'internal' && vars.APPKIT_ANDROID_INTERNAL_FIREBASE_APP_ID || vars.APPKIT_ANDROID_PROD_FIREBASE_APP_ID }}
secrets:
env-file: ${{ secrets.APPKIT_ENV_FILE }}
sentry-file: ${{ secrets.W3M_WAGMI_SENTRY_FILE }}
sentry-file: ${{ secrets.APPKIT_SENTRY_FILE }}
secrets-file: ${{ secrets.ANDROID_SECRETS_FILE }}
firebase-app-id: ${{ inputs.release-type == 'internal' && secrets.W3M_WAGMI_ANDROID_INTERNAL_FIREBASE_APP_ID || secrets.APPKIT_ANDROID_PROD_FIREBASE_APP_ID }}
gsa-key: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }}
keystore-name: ${{ inputs.release-type == 'internal' && secrets.WC_INTERNAL_KEYSTORE_NAME || vars.WC_PROD_KEYSTORE_NAME }}
keystore-name: ${{ inputs.release-type == 'internal' && vars.WC_INTERNAL_KEYSTORE_NAME || vars.WC_PROD_KEYSTORE_NAME }}
keystore: ${{ inputs.release-type == 'internal' && secrets.WC_INTERNAL_KEYSTORE || secrets.WC_PROD_KEYSTORE }}
aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }}
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
Expand All @@ -65,7 +66,7 @@ jobs:
upload-to-bucket: ${{ inputs.e2e-build }}
secrets:
env-file: ${{ secrets.APPKIT_ENV_FILE }}
sentry-file: ${{ secrets.W3M_WAGMI_SENTRY_FILE }}
sentry-file: ${{ secrets.APPKIT_SENTRY_FILE }}
apple-username: ${{ secrets.APPLE_USERNAME }}
apple-key-id: ${{ secrets.APPLE_KEY_ID }}
apple-key-content: ${{ secrets.APPLE_KEY_CONTENT }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release-ios-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@ jobs:
# Create sentry file
- run: touch ${{ inputs.root-path }}/ios/sentry.properties && echo "${{ secrets.sentry-file }}" >> ${{ inputs.root-path }}/ios/sentry.properties

# Add Google Services file -> to create it run: base64 -i path/to/GoogleService-Info.plist
# Add Google Services file (base64 encoded due to XML structure)
# To encode: base64 -i path/to/GoogleService-Info.plist | pbcopy
- name: Create Google Services file
env:
google-services-file: ${{ secrets.google-services-file }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-pos-poc.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Release Mobile POS (PoC)
run-name: "Mobile POS (PoC) - ${{ inputs.platform == 'ios' && '🍎 iOS' || '🤖 Android' }}"

permissions:
id-token: write
Expand Down Expand Up @@ -27,11 +28,11 @@ jobs:
output-path: 'dapps/poc-pos-app/android/app/build/outputs/apk/release/app-release.apk'
package-manager: 'npm'
is-expo-project: true
firebase-app-id: ${{ vars.POC_POS_ANDROID_FIREBASE_APP_ID }}
secrets:
env-file: ${{ secrets.POC_POS_ENV_FILE }}
sentry-file: ${{ secrets.POC_POS_SENTRY_FILE }}
secrets-file: ${{ secrets.ANDROID_SECRETS_FILE }}
firebase-app-id: ${{ secrets.POC_POS_ANDROID_FIREBASE_APP_ID }}
gsa-key: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }}
keystore-name: ${{ vars.WC_PROD_KEYSTORE_NAME }}
keystore: ${{ secrets.WC_PROD_KEYSTORE }}
Expand All @@ -51,7 +52,6 @@ jobs:
apple-id: '6757806391'
project-type: 'dapp'
package-manager: 'npm'
testflight-groups: 'External'
is-expo-project: true
secrets:
env-file: ${{ secrets.POC_POS_ENV_FILE }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release-pos.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Release Mobile POS
run-name: "Mobile POS - ${{ inputs.platform == 'ios' && '🍎 iOS' || '🤖 Android' }}"

permissions:
id-token: write
Expand Down Expand Up @@ -30,11 +31,11 @@ jobs:
output-path: 'dapps/pos-app/android/app/build/outputs/apk/release/app-release.apk'
package-manager: 'npm'
is-expo-project: true
firebase-app-id: ${{ vars.POS_ANDROID_FIREBASE_APP_ID }}
secrets:
env-file: ${{ secrets.POS_ENV_FILE }}
sentry-file: ${{ secrets.POS_SENTRY_FILE }}
secrets-file: ${{ secrets.ANDROID_SECRETS_FILE }}
firebase-app-id: ${{ secrets.POS_ANDROID_FIREBASE_APP_ID }}
gsa-key: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }}
keystore-name: ${{ vars.WC_PROD_KEYSTORE_NAME }}
keystore: ${{ secrets.WC_PROD_KEYSTORE }}
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/release-walletkit.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Release WalletKit
run-name: "WalletKit - ${{ inputs.platform == 'ios' && '🍎 iOS' || '🤖 Android' }} (${{ inputs.release-type }})"

permissions:
id-token: write
Expand Down Expand Up @@ -38,13 +39,13 @@ jobs:
project-type: 'wallet'
output-path: ${{ inputs.release-type == 'internal' && 'wallets/rn_cli_wallet/android/app/build/outputs/apk/internal/app-internal.apk' || 'wallets/rn_cli_wallet/android/app/build/outputs/apk/release/app-release.apk' }}
upload-to-bucket: ${{ inputs.e2e-build }}
firebase-app-id: ${{ inputs.release-type == 'internal' && vars.WALLETKIT_ANDROID_INTERNAL_FIREBASE_APP_ID || vars.WALLETKIT_ANDROID_PROD_FIREBASE_APP_ID }}
secrets:
env-file: ${{ secrets.WALLETKIT_ENV_FILE }}
sentry-file: ${{ secrets.W3W_SENTRY_FILE }}
sentry-file: ${{ secrets.WALLETKIT_SENTRY_FILE }}
secrets-file: ${{ secrets.ANDROID_SECRETS_FILE }}
firebase-app-id: ${{ inputs.release-type == 'internal' && secrets.W3W_ANDROID_INTERNAL_FIREBASE_APP_ID || secrets.W3W_ANDROID_PROD_FIREBASE_APP_ID }}
gsa-key: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_KEY }}
keystore-name: ${{ inputs.release-type == 'internal' && secrets.WC_INTERNAL_KEYSTORE_NAME || vars.WC_PROD_KEYSTORE_NAME }}
keystore-name: ${{ inputs.release-type == 'internal' && vars.WC_INTERNAL_KEYSTORE_NAME || vars.WC_PROD_KEYSTORE_NAME }}
keystore: ${{ inputs.release-type == 'internal' && secrets.WC_INTERNAL_KEYSTORE || secrets.WC_PROD_KEYSTORE }}
google-services-file: ${{ secrets.ANDROID_GOOGLE_SERVICES_BASE64 }}
aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }}
Expand All @@ -66,7 +67,7 @@ jobs:
upload-to-bucket: ${{ inputs.e2e-build }}
secrets:
env-file: ${{ secrets.WALLETKIT_ENV_FILE }}
sentry-file: ${{ secrets.W3W_SENTRY_FILE }}
sentry-file: ${{ secrets.WALLETKIT_SENTRY_FILE }}
apple-username: ${{ secrets.APPLE_USERNAME }}
apple-key-id: ${{ secrets.APPLE_KEY_ID }}
apple-key-content: ${{ secrets.APPLE_KEY_CONTENT }}
Expand All @@ -75,7 +76,7 @@ jobs:
match-keychain-password: ${{ secrets.MATCH_KEYCHAIN_PASSWORD }}
match-git-url: ${{ secrets.MATCH_GIT_URL }}
match-ssh-key: ${{ secrets.MATCH_SSH_KEY }}
google-services-file: ${{ inputs.release-type == 'internal' && secrets.W3W_IOS_INTERNAL_GOOGLE_SERVICES_FILE || secrets.W3W_IOS_PROD_GOOGLE_SERVICES_FILE }}
google-services-file: ${{ inputs.release-type == 'internal' && secrets.WALLETKIT_IOS_INTERNAL_GOOGLE_SERVICES_FILE || secrets.WALLETKIT_IOS_PROD_GOOGLE_SERVICES_FILE }}
aws-account-id: ${{ secrets.AWS_ACCOUNT_ID }}
slack-webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }}
testflight-url: ${{ inputs.release-type == 'internal' && vars.TESTFLIGHT_WALLETKIT_INTERNAL_URL || vars.TESTFLIGHT_WALLETKIT_PROD_URL }}
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.3.0
128 changes: 122 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,33 @@
# React Native Examples

React Native examples implementing Reown AppKit and WalletKit
A collection of React Native example apps showcasing [Reown](https://reown.com) AppKit and WalletKit SDKs. This repository includes sample dapps and reference wallet implementations that serve as testing grounds, learning resources, and reference code for developers integrating Reown SDKs into their projects.

## Wallet
## Wallets

- Wallet: `wallets/rn_cli_wallet`
- React Native CLI Wallet: `wallets/rn_cli_wallet`
- Expo Wallet (WIP): `wallets/expo-wallet`

## Dapps

- WalletConnect Modal + Viem: `dapps/ModalViem`
- WalletConnect Modal + Ethers v5: `dapps/ModalEthers`
- WalletConnect Modal + Universal Provider: `dapps/ModalUProvider`
### AppKit Apps

- AppKit + Wagmi + Multichain: `dapps/W3MWagmi`
- AppKit + Ethers: `dapps/W3MEthers`
- AppKit + Ethers v5: `dapps/W3MEthers5`
- AppKit + Expo + Wagmi: `dapps/appkit-expo-wagmi`

### POS Apps

- Point of Sale App: `dapps/pos-app`
- PoC Point of Sale App (legacy): `dapps/poc-pos-app`

### Legacy Apps (using @walletconnect/modal - deprecated)

> **Note:** These apps use the legacy `@walletconnect/modal` SDK which is deprecated. Use the AppKit apps above for new projects.

- WalletConnect Modal + Viem: `dapps/ModalViem`
- WalletConnect Modal + Ethers v5: `dapps/ModalEthers`
- WalletConnect Modal + Universal Provider: `dapps/ModalUProvider`

## Getting Started

Expand All @@ -23,6 +36,109 @@ React Native examples implementing Reown AppKit and WalletKit
- Read through the various README files for further information
- Submit any issues / feature requests.

## Fastlane

This repository uses [Fastlane](https://fastlane.tools) for iOS build automation and certificate management.

### Installation

**macOS users:** It's recommended to use [rbenv](https://github.com/rbenv/rbenv) to manage Ruby versions:

```bash
# Install rbenv via Homebrew
brew install rbenv

# Install Ruby 3.3.0
rbenv install 3.3.0

# Set it as the local version for this project
rbenv local 3.3.0
```

Then install the Ruby dependencies:

```bash
# Install Ruby dependencies (includes Fastlane and CocoaPods)
bundle install
```

### Creating Certificates for a New App

Use the provided script to create new certificates and provisioning profiles. The script handles creating a branch, running fastlane match, and creating a PR (required since the certificates repo has branch protection):

```bash
# Make the script executable (first time only)
chmod +x scripts/create-certificates.sh

# Create App Store certificates (creates PR for manual review)
./scripts/create-certificates.sh <certificates_repo> <bundle_id> <apple_email> appstore

# Create development certificates
./scripts/create-certificates.sh <certificates_repo> <bundle_id> <apple_email> development

# Auto-merge the PR (skip manual review)
./scripts/create-certificates.sh <certificates_repo> <bundle_id> <apple_email> appstore --auto-merge
```

**Example:**

```bash
./scripts/create-certificates.sh reown-com/mobile-certificates com.reown.myapp dev@reown.com appstore
./scripts/create-certificates.sh reown-com/mobile-certificates com.reown.myapp dev@reown.com development
```

> **Note:** Requires [GitHub CLI](https://cli.github.com/) (`gh`) to be installed and authenticated. By default, the script creates a PR that requires manual merge. Use `--auto-merge` to automatically merge.

### Downloading Certificates Locally

To download existing certificates without modifying them (readonly mode):

```bash
# Download development certificates
bundle exec fastlane match development --readonly --git_url <certificates_repo_url> --app_identifier <bundle_id>

# Download App Store certificates
bundle exec fastlane match appstore --readonly --git_url <certificates_repo_url> --app_identifier <bundle_id>
```

## Configuration Files

### Sentry Configuration

The `sentry.properties` file is required for both iOS and Android to upload source maps and debug symbols. The same file content works for both platforms.

**Option 1: Sentry Wizard (recommended)**

```bash
npx @sentry/wizard@latest -i reactNative
```

This will guide you through connecting your Sentry account and automatically create the configuration files.

**Option 2: Manual creation**

Create `ios/sentry.properties` and `android/sentry.properties` with:

```properties
defaults.url=https://sentry.io/
defaults.org=<your-org>
defaults.project=<your-project>
auth.token=<your-auth-token>
```

### Google Services Files (for GitHub Secrets)

Both Android and iOS Google Services files should be base64-encoded before storing in GitHub Secrets:

```bash
# Android - encode google-services.json
base64 -i /path/to/google-services.json | pbcopy

# iOS - encode GoogleService-Info.plist
base64 -i /path/to/GoogleService-Info.plist | pbcopy
```

The workflows will automatically decode them during the build process.

## Support

Expand Down
2 changes: 1 addition & 1 deletion dapps/poc-pos-app/app.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"expo": {
"name": "WPay",
"name": "WPay PoC",
"slug": "mobile-pos-poc",
"version": "1.0.0",
"orientation": "portrait",
Expand Down
Loading