Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: implementing Firebase messaging on iOS/Android #10184

Merged
merged 22 commits into from
Jul 11, 2024

Conversation

Jonathansoufer
Copy link
Contributor

@Jonathansoufer Jonathansoufer commented Jun 29, 2024

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 we endorse using Charles Proxy instead.

Related issues

Fixes:

Manual testing steps

  1. Start an Android building. Expect no error.

Screenshots/Recordings

Before

After

Screen.Recording.2024-06-25.at.20.08.51.mov

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • 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 Jonathansoufer self-assigned this Jun 29, 2024
@Jonathansoufer Jonathansoufer requested review from a team as code owners June 29, 2024 22:03
Copy link
Contributor

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.

@Jonathansoufer Jonathansoufer added team-mobile-platform team-notifications Notifications team Run Smoke E2E Triggers smoke e2e on Bitrise labels Jun 29, 2024
Copy link

socket-security bot commented Jun 29, 2024

🚨 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

@metamaskbot metamaskbot added the team-snaps-platform Snaps Platform team label Jun 29, 2024
Copy link
Contributor

github-actions bot commented Jun 29, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 51c53d0
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

@codecov-commenter
Copy link

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 ⚠️
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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Jonathansoufer Jonathansoufer added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Jul 1, 2024
Copy link
Contributor

github-actions bot commented Jul 1, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 62e8dfb
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

@Jonathansoufer Jonathansoufer added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Jul 1, 2024
@Jonathansoufer Jonathansoufer added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Jul 2, 2024
Copy link
Contributor

github-actions bot commented Jul 2, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 1eda810
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

README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@Prithpal-Sooriya Prithpal-Sooriya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Once this is in we can focus on the implementation. And using this for push notifications.

ios/Podfile Show resolved Hide resolved
Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some comments

ios/Gemfile.lock Outdated Show resolved Hide resolved
ios/GoogleService-Info.plist Outdated Show resolved Hide resolved
ios/GoogleService-Info.plist Outdated Show resolved Hide resolved
app/util/notifications/methods/fcmHelper.ts Outdated Show resolved Hide resolved
app/util/notifications/methods/fcmHelper.ts Outdated Show resolved Hide resolved
app/util/notifications/methods/fcmHelper.ts Outdated Show resolved Hide resolved
app/util/notifications/methods/fcmHelper.ts Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
android/app/mock-google-services.json Outdated Show resolved Hide resolved
ios/GoogleService-Info.plist Outdated Show resolved Hide resolved
@Jonathansoufer Jonathansoufer requested a review from Cal-L July 10, 2024 21:47
Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Last 2 comments

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Jonathansoufer and others added 2 commits July 11, 2024 09:19
Co-authored-by: Cal Leung <[email protected]>
Co-authored-by: Cal Leung <[email protected]>
@Jonathansoufer Jonathansoufer requested a review from Cal-L July 11, 2024 08:19
@Jonathansoufer Jonathansoufer added the No QA Needed Apply this label when your PR does not need any QA effort. label Jul 11, 2024
Copy link

sonarcloud bot commented Jul 11, 2024

@Jonathansoufer Jonathansoufer added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Jul 11, 2024
Copy link
Contributor

github-actions bot commented Jul 11, 2024

https://bitrise.io/ Bitrise

✅✅✅ pr_smoke_e2e_pipeline passed on Bitrise! ✅✅✅

Commit hash: 1685749
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

Copy link
Contributor

@Cal-L Cal-L left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. For socket security, we can ignore the new packages from firebase

@Jonathansoufer Jonathansoufer merged commit 2c137c5 into main Jul 11, 2024
41 of 43 checks passed
@Jonathansoufer Jonathansoufer deleted the feat/firebase-messaging branch July 11, 2024 17:30
@github-actions github-actions bot locked and limited conversation to collaborators Jul 11, 2024
@metamaskbot metamaskbot added the release-7.28.0 Issue or pull request that will be included in release 7.28.0 label Jul 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
No QA Needed Apply this label when your PR does not need any QA effort. release-7.28.0 Issue or pull request that will be included in release 7.28.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-mobile-platform team-notifications Notifications team team-snaps-platform Snaps Platform team
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants