Skip to content

Commit

Permalink
Merge branch 'main' into 8618-reduce-enzyme-usage-in-unit-test-by-25-…
Browse files Browse the repository at this point in the history
…--3-of-3
  • Loading branch information
Daniel-Cross authored Oct 1, 2024
2 parents 941cdab + d49bb50 commit ee7f5a5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,20 @@ cd metamask-mobile

**Firebase Messaging Setup**

Before running the app, keep in mind that MetaMask uses FCM (Firebase Cloud Message) to empower communications. Based on this, would be preferable that you provide your own Firebase project config file and update your `google-services.json` file in the `android/app` directory as well your .env files (ios.env, js.env, android.env), adding GOOGLE_SERVICES_B64 variable depending on the environment you are running the app (ios/android).
Before running the app, keep in mind that MetaMask uses FCM (Firebase Cloud Message) to empower communications. Based on this, as an external contributor you would preferably need to provide your own FREE Firebase project config file with a matching client for package name `io.metamask`, and update your `google-services.json` file in the `android/app` directory as well your `.env` files (`.ios.env`, `.js.env`, `.android.env`), adding `GOOGLE_SERVICES_B64` variable depending on the environment you are running the app (ios/android).

ATTENTION: In case you don't provide your own Firebase project config file, you can make usage of a mock file at `android/app/google-services-example.json`, following the steps below from the root of the project:
The value you should provide to `GOOGLE_SERVICES_B64` is the base64 encoded version of your Firebase project config file, which can be generated as follows:

```bash
base64 -i ./android/app/google-services-example.json
```

Copy the result to your clipboard and paste it in the GOOGLE_SERVICES_B64 variable in the .env file you are running the app.
Copy the result to your clipboard and paste it in the `GOOGLE_SERVICES_B64` variable in the `.env` file you are running the app.

> [!CAUTION]
> In case you don't provide your own Firebase project config file, you will face the error `No matching client found for package name 'io.metamask'`.
You can make usage of a mock file at `android/app/google-services-example.json`, following the same steps above from the root of the project.

In case of any doubt, please follow the instructions in the link below to get your Firebase project config file.

Expand Down
11 changes: 8 additions & 3 deletions android/app/google-services-example.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,20 @@
},
"client": [
{
"api_key": [
{
"current_key": ""
}
],
"client_info": {
"mobilesdk_app_id": "1:123456789000:android:f1bf012572b04063",
"client_id": "android:com.google.samples.quickstart.admobexample",
"client_id": "android:io.metamask",
"client_type": 1,
"android_client_info": {
"package_name": "com.google.samples.quickstart.admobexample",
"package_name": "io.metamask",
"certificate_hash": []
}
},
}
}
],
"configuration_version": "1"
Expand Down

0 comments on commit ee7f5a5

Please sign in to comment.