metamask-mobile icon indicating copy to clipboard operation
metamask-mobile copied to clipboard

chore: implementing Firebase messaging on iOS/Android

Open Jonathansoufer opened this issue 1 year ago • 6 comments

Description

This PR aims to handle ONLY the addition of Firebase related libraries to our codebase as well implements iOS and Android specific setup to enable Push Notifications FCM on MetaMask Mobile. No changes on consuming Push Notifications will take place on THIS PR since we're breaking this implementation down. No visual changes are introduced as well nor ways to test it, since the video updated is just to increase the understanding of what the changes will empower.

Documentation used for implementing it, here

ATTENTION: Flipper DOESN'T work with Firebase, so endorse using Charles Proxy instead.

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Before

After

https://github.com/MetaMask/metamask-mobile/assets/44679989/dd9f7570-a4cb-4831-9cb2-23bc5ce920a4

Pre-merge author checklist

Pre-merge reviewer checklist

  • [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • [x] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Jonathansoufer avatar Jun 29 '24 22:06 Jonathansoufer

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

github-actions[bot] avatar Jun 29 '24 22:06 github-actions[bot]

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSourceCI
New author npm/[email protected] 🚫

View full report↗︎

Next steps

What is new author?

A new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.

Scrutinize new collaborator additions to packages because they now have the ability to publish code into your dependency tree. Packages should avoid frequent or unnecessary additions or changes to publishing rights.

Take a deeper look at the dependency

Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all

socket-security[bot] avatar Jun 29 '24 22:06 socket-security[bot]

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 51c53d00cb3d943e1eed16eb4916432e1cfbd5d0 Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/36e06c75-9a14-44a1-95f5-dde2370516f6

[!NOTE]

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

github-actions[bot] avatar Jun 29 '24 22:06 github-actions[bot]

Codecov Report

Attention: Patch coverage is 55.26316% with 17 lines in your changes missing coverage. Please review.

Project coverage is 49.51%. Comparing base (ea14ef7) to head (51c53d0). Report is 5 commits behind head on main.

Files Patch % Lines
app/util/notifications/methods/fcmHelper.ts 55.26% 10 Missing and 7 partials :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10184      +/-   ##
==========================================
+ Coverage   49.50%   49.51%   +0.01%     
==========================================
  Files        1438     1439       +1     
  Lines       34674    34707      +33     
  Branches     3853     3860       +7     
==========================================
+ Hits        17166    17186      +20     
- Misses      16426    16434       +8     
- Partials     1082     1087       +5     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar Jun 29 '24 22:06 codecov-commenter

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 62e8dfb9baa2a4c84d27d110cc1440dbc892e195 Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/3e269d42-5964-407f-885a-33a26924ccb3

[!NOTE]

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

github-actions[bot] avatar Jul 01 '24 13:07 github-actions[bot]

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 1eda810f2ed43c391cba879c86e61d549e2776c0 Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/c7a2c228-ad8b-4e80-a682-03e94bdb51a9

[!NOTE]

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

github-actions[bot] avatar Jul 02 '24 20:07 github-actions[bot]

New dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@react-native-firebase/[email protected] Transitive: environment +9 637 kB salakar
npm/@react-native-firebase/[email protected] None 0 268 kB salakar

View full report↗︎

socket-security[bot] avatar Jul 08 '24 10:07 socket-security[bot]

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 1685749098baf88c140c8f79c215f389d1656305 Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/3e9ac06e-8043-4c1d-9b25-23da8230cbec

[!NOTE]

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

github-actions[bot] avatar Jul 11 '24 09:07 github-actions[bot]